//proj3 ///GLOBALS/// float goldX, goldY, goldDX=3, goldDY=2; float letharX, letharY, letharDX=3, letharDY=2; float zobeX, zobeY, zobeDX=3, zobeDY=2; float sunX, sunY; float hh,xh,yh; float birdX=30, birdY=60; float horizon; void setup() { size(600,500); horizon= height/4; letharX= width/2; letharY= height/2; zobeX= height/4; zobeY= width/2; goldX= height/4; goldY= width/2; background(85, 192, 247); } void draw() { //NEXT FRAME// scene(); grass(); sun(); lethar(); gold(); zobe(); sun(); bird(X, Y); wing(X, Y); } void scene() { //scene: sky & horizon fill(85, 192, 247); rect(0, 0,width, height); } void grass() { //draw grass fill(10, 252, 76); rect(0, horizon, width, height); strokeWeight(2); stroke(0, 255, 255); // green grass, bottom of the screen. for (float x=50; xwidth) { birdX = 0; } } void wing(float X, float Y) { //bird at(x,y) fill(255, 0, 0); triangle(birdX, birdY, birdX-20, birdY-60, birdX+30, birdY-30); birdX+=3; if(birdX>width) { birdX = 3; } } void sun() { fill(255, 240,0); ellipse(sunX+50, sunY+50, 60, 60); sunX+= 1; if (sunX>width) { sunX = 0; } } void lethar() { // Move lethar if (letharX>width || letharX<0) letharDX *= -1; if (letharY>height ||letharYwidth || zobeX<0) zobeDX *= -1; if (zobeY>height ||zobeYwidth || goldX<0) goldDX *= -1; if (goldY>height ||goldY