Fix: god and speech bubble
This commit is contained in:
@@ -15,6 +15,9 @@ function God(x, y, mainGame) {
|
||||
|
||||
game.add.existing(this);
|
||||
|
||||
this.speechBubble = new SpeechBubble();
|
||||
this.speechBubble.hideSpeechBubble();
|
||||
|
||||
this.makeParticles(x, y);
|
||||
}
|
||||
|
||||
@@ -103,10 +106,10 @@ God.prototype.setScale = function(size) {
|
||||
}
|
||||
|
||||
|
||||
God.prototype.animateHappy = function(type) {
|
||||
this.loadTexture('god_happy');
|
||||
this.mainGame.speechBubble.showSpeechBubble(type);
|
||||
God.prototype.animateHappy = function(meat) {
|
||||
this.speechBubble.showSpeechBubble(meat);
|
||||
|
||||
this.loadTexture('god_happy');
|
||||
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);
|
||||
@@ -117,10 +120,25 @@ God.prototype.animateHappy = function(type) {
|
||||
this.particleBurst(God.REACTION_HAPPY);
|
||||
}
|
||||
|
||||
God.prototype.animateAngry = function(type) {
|
||||
this.loadTexture('god_angry');
|
||||
this.mainGame.speechBubble.showSpeechBubble(type);
|
||||
God.prototype.animateAngryWithRare = function(meat) {
|
||||
this.speechBubble.showSpeechBubble(meat);
|
||||
|
||||
this.loadTexture('god_angry');
|
||||
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);
|
||||
tween.onComplete.add(this.smileAgain, this);
|
||||
tween.start();
|
||||
|
||||
if(meat.getTotalCookingTime() == 0)
|
||||
this.particleBurst(God.REACTION_ANGRY);
|
||||
}
|
||||
|
||||
God.prototype.animateAngryWithBurnBlack = function(meat) {
|
||||
this.speechBubble.showSpeechBubble(meat);
|
||||
|
||||
this.loadTexture('god_angry');
|
||||
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);
|
||||
@@ -128,7 +146,6 @@ God.prototype.animateAngry = function(type) {
|
||||
tween.onComplete.add(this.smileAgain, this);
|
||||
tween.start();
|
||||
|
||||
// this.particleBurst(God.REACTION_HAPPY);
|
||||
this.particleBurst(God.REACTION_ANGRY);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user