Catch the Balls Reworked, 3/5/21
p5.js Web Editor
Code pen doesn’t work with the images:( Above is the p5 link! Thanks Peter
- Has x, y, bucketwidth, and size.
- Has back(), front(), top(), frontlip(), and move(). All the functions draw the bucket, while move allows the bucket to scroll with the arrow keys.
- Has size, speed, ballx, bally, and height.
- Imported a flower to be the ball.
- Includes the dist() so the flower restarts once it goes in and score goes up and goes faster, or score goes to 0 and game over happens.
- Has size, placementx, and placementy.
- Displays the score in the top with the number.
- Has placementx, placementy, placementX, and placementY.
- Placementx & y are for the text game over, while placementX & Y are for click to restart.
- Reset() so the all the classes are restarted, the score, speed, and location of the ball.