SHARE
TWEET

melanie animation

a guest Apr 23rd, 2019 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var timer = 0;
  2.  
  3. var leaf = createSprite(175, 166);
  4. leaf.setAnimation("leaf");
  5. leaf.visible = true;
  6. leaf.scale = 4;
  7.  
  8. var caterpillar = createSprite(200, 200);
  9. caterpillar.setAnimation("caterpillar");
  10. caterpillar.visible = false;
  11. caterpillar.scale = 4;
  12.  
  13. var sac = createSprite(200, 200);
  14. sac.setAnimation("sac");
  15. sac.visible = false;
  16. sac.scale = 4;
  17.  
  18. var butterfly = createSprite(200, 200);
  19. butterfly.setAnimation("butterfly");
  20. butterfly.visible = false;
  21. butterfly.scale = 4;
  22.  
  23. function draw() {
  24.   timer = timer + 1;
  25.   if (timer < 30) {
  26.     leaf.visible = true;
  27.   }
  28.   if (timer >= 60) {
  29.     leaf.visible = false;
  30.     caterpillar.visible = true;
  31.   }
  32.   if (timer >= 90) {
  33.     caterpillar.visible = false;
  34.     sac.visible = true;
  35.   }
  36.   if (timer >= 120) {
  37.     caterpillar.visible = false;
  38.     butterfly.visible = true;
  39.   }
  40.   drawSprites();
  41. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top