| 123456789101112131415161718192021222324252627 |
- //turtleSprite - Initialize When Scene Starts
- //raindrop cloning
- if($this.scene.state() == "PLAY"){
- createTimer(1000, function(){
- var ndrop = drop.clone();
- var rainX = random(760,40);
- ndrop.x(rainX);
- ndrop.y(10);
- });
- //lightning bolt cloning
- createTimer(5000, function(){
- var nbolt = bolt.clone();
- var boltx = random(760,40);
- nbolt.x(boltx);
- nbolt.y(10);
- });
- //This code will be new - but still the same as the last 2 activities
- //snowflake cloning
- //Add createTimer function for snowflake here
- createTimer(5000, function() {
- var nflake = snowflake.clone();
- var flakeX = random(760,40);
- nflake.x(flakeX);
- nflake.y(10);
- });
- }
|