Mummy attack :)

This commit is contained in:
Richard Davey
2013-08-30 18:56:10 +01:00
parent e77f5da2cd
commit 54d98944e4
6 changed files with 112 additions and 53 deletions
+10 -5
View File
@@ -25,21 +25,26 @@
function create() {
bunny = game.add.sprite(-40, 100, 'ms');
bunny = game.add.sprite(40, 100, 'ms');
bunny.animations.add('walk');
bunny.animations.play('walk', 50, true);
// bunny.scale.x = 8;
// bunny.scale.y = 8;
game.add.tween(bunny).to({ x: game.width }, 10000, Phaser.Easing.Linear.None, true);
}
// update isn't called until 'create' has completed. If you need to process stuff before that point (i.e. while the preload is still happening)
// then create a function called loadUpdate() and use that
function update() {
bunny.postUpdate();
if (bunny.x >= 300)
{
bunny.scale.x += 0.01;
bunny.scale.y += 0.01;
}
}
})();