xxxxxxxxxx
24
class frogs {
constructor(x, y) {
this.x = x;
this.y = y;
}
display() {
image(frog, x, y, 100 ,100);
}
move() {
this.x = this.x + 1; // cause the bubbles to move out of the screen so we can see them move back into view
this.y = this.y + 1;
// if statements to make the bubble come back into the screen view
//background(random(255));
}
if (y + 120 >= height || y <= 0) {
yspeed = yspeed * -1;
}
}
}