Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int myVar;
- int myVar2;
- int pee;
- int poo;
- void setup() {
- // I am inside the setup function
- // This changes the size of the Screen
- size(800,600);
- // This changes the... framerate
- frameRate(60);
- // This changes the background
- background(255,0,255);
- pee = 10;
- poo = 10;
- }
- void draw() {
- background(191,54,193);
- // I am inside the draw function
- myVar = myVar + pee;
- myVar2 = myVar2 + poo;
- // if circle reaches the right side of the screen
- // make it go left
- if (myVar > 800) {
- pee = -10;
- }
- // if circle reaches the left side of the screen
- // make it go right
- if (myVar < 0) {
- pee = 10;
- }
- if (myVar2 < 0) {
- poo = 10;
- }
- if (myVar2 > 600) {
- poo = -10;
- }
- ellipse(myVar,myVar2,100,100);
- }
- void potatoes() {
- // I am inside the draw function
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement