Advertisement
Xplosive_

wsajidfds

Mar 28th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var salt = createSprite (200, 200);
  2.  
  3. salt.setAnimation("Salt.jpg");
  4.  
  5. salt.rotation = 150;
  6. ellipse(200, 200, 400, 400);
  7.  z = 0;
  8.  x = 0;
  9.  y = 0;
  10.  j = 0;
  11. function draw() {
  12.   background("#00c5ff");
  13.   var mousex = World.mousex;
  14.   // If mouseDidMove, rotate the salt shaker randomly to the left or righ
  15.   if (mouseDidMove()){
  16.      salt.rotation = salt.rotation + randomNumber(-1, 1);
  17.     playSound("Salt_Shaker_SOUND_EFFECT_-_Salzstreuer_SOUND-ZZzBILozlGU.mp3", false);
  18.    z++;
  19.    x++;
  20.    j++;
  21.    y++;
  22.    
  23.   } else  {
  24.     salt.rotation = 150;
  25.    stopSound("Salt_Shaker_SOUND_EFFECT_-_Salzstreuer_SOUND-ZZzBILozlGU.mp3")
  26.   }
  27.   if (z < 30){
  28.    
  29.    
  30.      var pile = createSprite (300, 200);
  31. pile.setAnimation("Pile.jpg");
  32.  
  33. var square = createSprite(300,400)
  34. square.setAnimation("square")
  35. square.scale = 1;
  36. square.height = 300;
  37. square.width = 400;
  38. pile.scale = 4;
  39.  
  40. drawSprites()
  41.  
  42.      
  43.  
  44.    
  45.    } else if(j == 30) {
  46. var square2 = createSprite(300,400)      
  47.     square2.setAnimation("square")
  48.     square2.scale = 1;
  49.     square2.height = 300;
  50. square2.width = 400;
  51.      var pile = createSprite (300, 200);
  52. pile.setAnimation("Pile.jpg");
  53.  
  54. var squares = createSprite(300,300)
  55. squares.setAnimation("square")
  56. squares.scale = 1;
  57. squares.height = 100;
  58. squares.width = 400;
  59. pile.scale = 4;
  60.    } else if (x == 60){
  61.    var square3 = createSprite(300,400)      
  62.     square3.setAnimation("square")
  63.     square3.scale = 1;
  64.     square3.height = 300;
  65. square3.width = 400;
  66.      var pile = createSprite (300, 200);
  67. pile.setAnimation("Pile.jpg");
  68. pile.scale = 4;
  69. var square = createSprite(300,100)
  70. square.setAnimation("square")
  71. square.scale = 1;
  72. square.height = 100;
  73. square.width = 400;
  74.  
  75. drawSprites()
  76.    }
  77.    
  78.   drawSprites();
  79. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement