Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var circle = [100, 200, 300, 400];
- var boop = 0;
- function setup() {
- createCanvas(500, 500);
- }
- function draw() {
- background(255);
- fill (50,100,200);
- rect(circle[boop], 250, 100, 100);
- }
- function mousePressed() {
- boop = boop + 1;
- if(boop > 3){
- boop = 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement