package Sprites; /** * Created by sagi on 22/01/2016. */ public class Bird extends Sprite { public Bird(int xPosition, int pWidth, int pHeight, int size){ super(xPosition, pHeight/2, pWidth, pHeight, 0, "birdSprite.png", 0 ,size, size); } @Override public void update() { if(acceleration > -10 ) { acceleration--; } locY -= acceleration; if(angle <= 45) angle += 5; } public void jump() { this.acceleration = 10; angle = -45; } }