Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var balloon = createSprite(200, 200);
- balloon.setAnimation("balloon");
- balloon.scale = 0.1;
- var pop = createSprite(200, 200);
- pop.setAnimation("pop");
- pop.scale = 0.6;
- pop.visible = false;
- function draw() {
- // Draw Background
- background("white");
- // Update Values
- balloon.scale = balloon.scale + 0.001;
- console.log(balloon.scale);
- if (balloon.scale >= 0.5) {
- balloon.visible = false;
- pop.visible = true;
- }
- // Draw Animations
- drawSprites();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement