Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int X, Y;
- int rectloc = 100;
- int elliloc = 300;
- void setup() {
- size(500, 500);
- background(#000000);
- //frameRate(10);
- //noStroke();
- }
- void draw() {
- background(#000000); // "redraws" the screen.
- text("Meow", 1, height-(height-11));
- // rect(X, Y, 55, 55);
- rect(rectloc, rectloc, 55, 55);
- if(X > rectloc && X < rectloc+55 && Y > rectloc && Y < rectloc+55) {
- int i = 10;
- while(i--) rect(random(500), random(500), 55, 55);
- }
- ellipse(elliloc, elliloc, 55, 55);
- if(X > elliloc && X < elliloc+55 && Y > elliloc && Y < elliloc+55) {
- int i = 10;
- while(i--) ellipse(random(500), random(500), 55, 55);
- }
- }
- void mouseMoved( ) {
- X = mouseX;
- Y = mouseY;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement