Fix: porting done

This commit is contained in:
2018-10-31 22:59:43 +09:00
parent 5464642d9b
commit 9c91dcbe22
6 changed files with 349 additions and 53 deletions
+6 -5
View File
@@ -1,4 +1,5 @@
God = function(game, x, y) {
God = function(x, y, mainGame) {
this.mainGame = mainGame;
this.isActivated = true;
Phaser.Sprite.call(this, game, x, y, 'god_angry');
@@ -39,9 +40,9 @@ God.prototype.setScale = function(size) {
God.prototype.animateHappy = function(type) {
this.loadTexture('god_happy');
showSpeechBubble(type);
this.mainGame.speechBubble.showSpeechBubble(type);
var tween = game.add.tween(god.scale);
var tween = game.add.tween(this.scale);
tween.to({x:0.7, y:0.7}, 500, Phaser.Easing.Quadratic.Out, true, 0);
// tween.to({x:0.7, y:0.7}, 1000, Phaser.Easing.Elastic.InOut, true, 0, 2, true);
// tween.to({x:0.7, y:0.7}, 1000, Phaser.Easing.Linear.None, true, 0);
@@ -51,9 +52,9 @@ God.prototype.animateHappy = function(type) {
God.prototype.animateAngry = function(type) {
this.loadTexture('god_angry');
showSpeechBubble(type);
this.mainGame.speechBubble.showSpeechBubble(type);
var tween = game.add.tween(god.scale);
var tween = game.add.tween(this.scale);
tween.to({x:0.7, y:0.7}, 1000, Phaser.Easing.Bounce.Out, true, 0);
// tween.to({x:0.7, y:0.7}, 1000, Phaser.Easing.Elastic.InOut, true, 0, 2, true);
// tween.to({x:0.7, y:0.7}, 1000, Phaser.Easing.Linear.None, true, 0);