Fix: god and speech bubble

This commit is contained in:
2019-12-10 10:37:04 +09:00
parent 2448c9fd55
commit dfbe501393
5 changed files with 102 additions and 56 deletions
+17 -15
View File
@@ -91,11 +91,6 @@ var Game = {
// this.bonusMeat.setActive(false, -100, -100, "");
// speech bubble
this.speechBubble = new SpeechBubble(game.world.centerX + 100, game.world.centerY - 160);
this.speechBubble.hideSpeechBubble();
var experienceAppTimer = new ExperienceAppTimer();
experienceAppTimer.setTimeOverListener(
(function() { this.timeOver(); }).bind(this)
@@ -268,28 +263,35 @@ var Game = {
// console.log("god eat : " + meat);
// console.log("meat grade : " + meat.getMeatGrade());
var meatClassName = meat.getClassName();
if(meat.getMeatGrade() == Meat.DONENESS_WELLDONE) {
this.god.animateHappy(Meat.DONENESS_WELLDONE); // "맛있어♥♡♥");
// this.god.animateHappy(Meat.DONENESS_WELLDONE, meatClassName, meat.getTotalCookingTime());
this.god.animateHappy(meat);
// var score = this.getScore();
var score = meat.getScore(Meat.DONENESS_WELLDONE);
var score = meat.getScore();
this.scoreManager.plusScore(score);
var tempPlusScore = new PlusScore(this.god.x, this.god.y - 180, score);
var tempPlusScore = new PlusScore(this.god.x, this.god.y - 250, score);
this.plusScoreGroup.add(tempPlusScore);
} else if(meat.getMeatGrade() == Meat.DONENESS_RARE) {
this.god.animateAngry(Meat.DONENESS_RARE); // "날고기 싫어!!!");
// this.god.animateAngryWithRare(Meat.DONENESS_RARE, meatClassName, meat.getTotalCookingTime());
this.god.animateAngryWithRare(meat);
// var score = this.getScore();
var score = meat.getScore(Meat.DONENESS_WELLDONE);
this.scoreManager.plusScore(score);
if(meat.getTotalCookingTime() > 0) {
var score = meat.getScore();
this.scoreManager.plusScore(score);
var tempPlusScore = new PlusScore(this.god.x, this.god.y - 180, score);
this.plusScoreGroup.add(tempPlusScore);
var tempPlusScore = new PlusScore(this.god.x, this.god.y - 250, score);
this.plusScoreGroup.add(tempPlusScore);
}
} else {
this.badMeatCount++;
this.god.animateAngry(Meat.DONENESS_BURN_BLACK); // "탄 고기 안먹어!!!");
// this.god.animateAngryWithBurnBlack(Meat.DONENESS_BURN_BLACK, meatClassName, meat.getTotalCookingTime());
this.god.animateAngryWithBurnBlack(meat);
/*
if(meat.getMeatGrade() == Meat.DONENESS_RARE) {
this.god.animateAngry(Meat.DONENESS_RARE); // "날고기 싫어!!!");
@@ -301,7 +303,7 @@ var Game = {
meat.setActive(false, -100, -100, '');
if(meat.getClassName() == NormalMeat.CLASS_NAME) {
if(meatClassName == NormalMeat.CLASS_NAME) {
this.clearedMeatCount++;
if(this.clearedMeatCount == this.activatedMeatCount) {
this.clearStage();