diff --git a/src/Bird.java b/src/Bird.java new file mode 100644 index 0000000000000000000000000000000000000000..c4d196780cb7073a5089aa2f61bb63495015e2b2 --- /dev/null +++ b/src/Bird.java @@ -0,0 +1,30 @@ +import bagel.Image; + +public class Bird { + /* positive means moving up, negative means moving down */ + public double velocity; + private static int frameCounterSinceStart = 0; + + public Image birdWingUp = new Image("res/birdWingUp.png"); + public Image birdWingDown = new Image("res/birdWingDown.png"); + + public final double acceleration = 0.4; + public final double terminalVelocity = 10; + + public final double x = 200; + public double y = 350; + + public void Bird() { + } + + public void Render() { + + if(this.frameCounterSinceStart % 10 == 0) { + this.birdWingUp.draw(this.x, this.y); /* repeat every 10 frames */ + } + else { + this.birdWingDown.draw(this.x, this.y); + } + this.frameCounterSinceStart++; + } +} \ No newline at end of file