Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float
- y = 50,
- step = 5.0,
- gravity = 0.2;
- int repeat = 10;
- void setup () {
- size(1280, 747);
- noStroke();
- }
- void draw () {
- background(0);
- y += step;
- step += gravity;
- if (y > height) {
- step *= -0.9;
- --repeat;
- }
- if (repeat < 0)
- noLoop();
- fill(255);
- circle(width/2, y, 50);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement