Add: chain animation

This commit is contained in:
2018-05-11 11:48:53 +09:00
parent 8ec9129c8e
commit 50d9937c75
2 changed files with 37 additions and 28 deletions
+3 -13
View File
@@ -24,18 +24,7 @@ class Game {
this.onAlienFired, this.onAlienEscaped
);
alien.setActive(true);
alien.moveOnStage();
/*
let alien = game.add.sprite(this.game.world.width / 2, this.game.world.height / 2, 'alien_normal');
alien.anchor.set(0.5);
alien.scale.set(0);
let alienTween = game.add.tween(alien.scale);
// alienTween.to( { x: 4, y: 4 }, 1000, Phaser.Easing.Linear.None, true, 0, -1, true);
// alienTween.yoyo(true, 3000);
alienTween.to( { x: 4, y: 4 }, 1000, Phaser.Easing.Linear.None, false);
alienTween.start();
*/
alien.goOnstage();
// bottom
@@ -87,11 +76,12 @@ class Game {
onAlienFired(sprite) {
console.log("onAlienFired");
sprite.moveOnStage();
sprite.goOnstage();
}
onAlienEscaped(sprite) {
console.log("onAlienEscaped");
// sprite.goOnstage();
}
}