Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float x;
- float y;
- void setup(){
- size(640,480);
- x = width/2;
- y = height/2;
- }
- void draw(){
- background(255);
- display();
- ascend();
- top();
- }
- void display(){
- stroke(0);
- strokeWeight(2);
- fill(127);
- ellipse(x, y, 50, 50);
- }
- void ascend(){
- y--;
- }
- void top(){
- if( y <= -20 ) y = height+20;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement