Advertisement
therrontelford

let it snow

Dec 7th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.55 KB | None | 0 0
  1. boolean isGold;
  2. int a=0;
  3.  
  4. void setup(){
  5.   size (1200,900);
  6.   background(100,0,0);
  7.   noStroke();
  8.   fill(85,54,33);
  9.   rect(575,600,50,300);
  10.   fill(0,100,0);
  11.   triangle(600,300,400,700,800,700);
  12.   isGold=true;
  13.  
  14. }
  15.  
  16. void mousePressed(){
  17. if (mousePressed){
  18.   if (isGold){
  19.     fill(232,190,50);
  20.     ellipse(mouseX,mouseY,25,25);
  21.     isGold=false;
  22.   }
  23.   else{
  24.     fill(193,193,193);
  25.     ellipse(mouseX,mouseY,25,25);
  26.     isGold=true;
  27. }}}
  28.  
  29.  
  30. void draw(){
  31.   a=a+1;
  32.   fill(255);
  33.   ellipse(random(0,width), a,3,3);
  34.   if (a > 900){
  35.     a=0;
  36. }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement