Fix: ignore score after time over
This commit is contained in:
@@ -119,19 +119,18 @@ var Game = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
initVariables: function() {
|
initVariables: function() {
|
||||||
this.playingStageNo;
|
this.isPlaying = false;
|
||||||
this.activatedMeatCount;
|
|
||||||
this.clearedMeatCount;
|
|
||||||
|
|
||||||
this.plusScoreTextGroup;
|
this.playingStageNo = 0;
|
||||||
|
this.activatedMeatCount = 0;
|
||||||
this.timeEvent;
|
this.clearedMeatCount = 0;
|
||||||
this.gameTimeEvents = [];
|
|
||||||
|
|
||||||
this.meatCount;
|
|
||||||
this.badMeatCount = 0;
|
this.badMeatCount = 0;
|
||||||
|
|
||||||
this.burnLevel = HeatPlate.BURN_LEVEL_WEAK;
|
this.burnLevel = HeatPlate.BURN_LEVEL_WEAK;
|
||||||
|
|
||||||
|
this.plusScoreTextGroup = null;
|
||||||
|
|
||||||
|
this.timeEvent = null;
|
||||||
|
this.gameTimeEvents = [];
|
||||||
},
|
},
|
||||||
|
|
||||||
makeStageTimerText: function() {
|
makeStageTimerText: function() {
|
||||||
@@ -200,6 +199,8 @@ var Game = {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
startGame: function() {
|
startGame: function() {
|
||||||
|
this.isPlaying = true;
|
||||||
|
|
||||||
this.playingStageNo = 1;
|
this.playingStageNo = 1;
|
||||||
this.clearedMeatCount = 0;
|
this.clearedMeatCount = 0;
|
||||||
this.badMeatCount = 0;
|
this.badMeatCount = 0;
|
||||||
@@ -272,6 +273,9 @@ var Game = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
godEatMeat: function(meat) {
|
godEatMeat: function(meat) {
|
||||||
|
if(!this.isPlaying)
|
||||||
|
return;
|
||||||
|
|
||||||
var meatClassName = meat.getClassName();
|
var meatClassName = meat.getClassName();
|
||||||
|
|
||||||
if(meat.getMeatGrade() == MeatBase.DONENESS_WELLDONE) {
|
if(meat.getMeatGrade() == MeatBase.DONENESS_WELLDONE) {
|
||||||
@@ -317,6 +321,9 @@ var Game = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
throwAway: function(meat) {
|
throwAway: function(meat) {
|
||||||
|
if(!this.isPlaying)
|
||||||
|
return;
|
||||||
|
|
||||||
if(meat.getMeatGrade() != MeatBase.DONENESS_BURN_BLACK)
|
if(meat.getMeatGrade() != MeatBase.DONENESS_BURN_BLACK)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -349,6 +356,8 @@ var Game = {
|
|||||||
|
|
||||||
|
|
||||||
timeOver: function() {
|
timeOver: function() {
|
||||||
|
this.isPlaying = false;
|
||||||
|
|
||||||
var timeOverText = new TimeOverText();
|
var timeOverText = new TimeOverText();
|
||||||
if(!isExperienceMaestroAccount())
|
if(!isExperienceMaestroAccount())
|
||||||
this.updateResultRecord();
|
this.updateResultRecord();
|
||||||
@@ -361,6 +370,10 @@ var Game = {
|
|||||||
}
|
}
|
||||||
this.gameTimeEvents = [];
|
this.gameTimeEvents = [];
|
||||||
|
|
||||||
|
for(var i = 0; i < Game.MAX_BONUS_MEAT_COUNT; i++) {
|
||||||
|
this.bonusMeatGroup.children[i].hide();
|
||||||
|
}
|
||||||
|
|
||||||
for(var i = 0; i < Game.MAX_NORMAL_MEAT_COUNT; i++) {
|
for(var i = 0; i < Game.MAX_NORMAL_MEAT_COUNT; i++) {
|
||||||
this.normalMeatGroup.children[i].hide();
|
this.normalMeatGroup.children[i].hide();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user