Add: add time bonus if all meat was welldone
This commit is contained in:
@@ -82,6 +82,9 @@ StageTimer.prototype.addTime = function(timeSec) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
StageTimer.prototype.addBonusTime = function(timeSec) {
|
StageTimer.prototype.addBonusTime = function(timeSec) {
|
||||||
|
if(timeSec == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
this.addTime(timeSec);
|
this.addTime(timeSec);
|
||||||
|
|
||||||
game.world.bringToTop(this.bonusTimeText);
|
game.world.bringToTop(this.bonusTimeText);
|
||||||
|
|||||||
@@ -107,6 +107,7 @@ var Game = {
|
|||||||
this.gameTimeEvents = [];
|
this.gameTimeEvents = [];
|
||||||
|
|
||||||
this.meatCount;
|
this.meatCount;
|
||||||
|
this.badMeatCount = 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
@@ -157,6 +158,7 @@ var Game = {
|
|||||||
|
|
||||||
startStage: function() {
|
startStage: function() {
|
||||||
this.clearedMeatCount = 0;
|
this.clearedMeatCount = 0;
|
||||||
|
this.badMeatCount = 0;
|
||||||
this.activatedMeatCount = this.getStageMeatCount();
|
this.activatedMeatCount = this.getStageMeatCount();
|
||||||
this.serveMeats();
|
this.serveMeats();
|
||||||
},
|
},
|
||||||
@@ -184,8 +186,20 @@ var Game = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getScore: function() {
|
||||||
|
return this.playingStageNo * 10;
|
||||||
|
},
|
||||||
|
|
||||||
getBonusTime: function() {
|
getBonusTime: function() {
|
||||||
return this.playingStageNo * 4;
|
if(this.badMeatCount > 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if(this.playingStageNo == 1)
|
||||||
|
return 5;
|
||||||
|
else if(this.playingStageNo == 2)
|
||||||
|
return 7;
|
||||||
|
else
|
||||||
|
return 6 + this.playingStageNo;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
@@ -234,12 +248,14 @@ var Game = {
|
|||||||
if(meat.getMeatGrade() == Meat.DONENESS_WELLDONE) {
|
if(meat.getMeatGrade() == Meat.DONENESS_WELLDONE) {
|
||||||
this.god.animateHappy(Meat.DONENESS_WELLDONE); // "맛있어♥♡♥");
|
this.god.animateHappy(Meat.DONENESS_WELLDONE); // "맛있어♥♡♥");
|
||||||
|
|
||||||
var score = 10 * this.playingStageNo;
|
var score = this.getScore();
|
||||||
this.scoreManager.plusScore(score);
|
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 - 180, score);
|
||||||
this.plusScoreGroup.add(tempPlusScore);
|
this.plusScoreGroup.add(tempPlusScore);
|
||||||
} else {
|
} else {
|
||||||
|
this.badMeatCount++;
|
||||||
|
|
||||||
if(meat.getMeatGrade() == Meat.DONENESS_RARE) {
|
if(meat.getMeatGrade() == Meat.DONENESS_RARE) {
|
||||||
this.god.animateAngry(Meat.DONENESS_RARE); // "날고기 싫어!!!");
|
this.god.animateAngry(Meat.DONENESS_RARE); // "날고기 싫어!!!");
|
||||||
} else { // Meat.DONENESS_BURN_BLACK
|
} else { // Meat.DONENESS_BURN_BLACK
|
||||||
|
|||||||
@@ -202,6 +202,7 @@ Meat.prototype.show = function() {
|
|||||||
Meat.prototype.hide = function() {
|
Meat.prototype.hide = function() {
|
||||||
this.isActivated = false;
|
this.isActivated = false;
|
||||||
this.alpha = 0;
|
this.alpha = 0;
|
||||||
|
this.stopCook();
|
||||||
}
|
}
|
||||||
|
|
||||||
Meat.prototype.startCook = function() {
|
Meat.prototype.startCook = function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user