From 718a6f71a9f060905d093f7b0dccd74450c67559 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=A2=E1=84=91=E1=85=B3=E1=86=AF=20=E1=84=82?= =?UTF-8?q?=E1=85=A9=E1=84=90=E1=85=B3=E1=84=87=E1=85=AE=E1=86=A8?= Date: Thu, 12 Dec 2019 10:21:19 +0900 Subject: [PATCH] Fix: ignore score after time over --- src/game/mouse/grilled_meat/game.js | 33 ++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/src/game/mouse/grilled_meat/game.js b/src/game/mouse/grilled_meat/game.js index d069037..cb999d6 100644 --- a/src/game/mouse/grilled_meat/game.js +++ b/src/game/mouse/grilled_meat/game.js @@ -119,19 +119,18 @@ var Game = { }, initVariables: function() { - this.playingStageNo; - this.activatedMeatCount; - this.clearedMeatCount; + this.isPlaying = false; - this.plusScoreTextGroup; - - this.timeEvent; - this.gameTimeEvents = []; - - this.meatCount; + this.playingStageNo = 0; + this.activatedMeatCount = 0; + this.clearedMeatCount = 0; this.badMeatCount = 0; - this.burnLevel = HeatPlate.BURN_LEVEL_WEAK; + + this.plusScoreTextGroup = null; + + this.timeEvent = null; + this.gameTimeEvents = []; }, makeStageTimerText: function() { @@ -200,6 +199,8 @@ var Game = { */ startGame: function() { + this.isPlaying = true; + this.playingStageNo = 1; this.clearedMeatCount = 0; this.badMeatCount = 0; @@ -272,6 +273,9 @@ var Game = { }, godEatMeat: function(meat) { + if(!this.isPlaying) + return; + var meatClassName = meat.getClassName(); if(meat.getMeatGrade() == MeatBase.DONENESS_WELLDONE) { @@ -317,6 +321,9 @@ var Game = { }, throwAway: function(meat) { + if(!this.isPlaying) + return; + if(meat.getMeatGrade() != MeatBase.DONENESS_BURN_BLACK) return; @@ -349,6 +356,8 @@ var Game = { timeOver: function() { + this.isPlaying = false; + var timeOverText = new TimeOverText(); if(!isExperienceMaestroAccount()) this.updateResultRecord(); @@ -361,6 +370,10 @@ var Game = { } 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++) { this.normalMeatGroup.children[i].hide(); }