Fix: wait and serve meats by waiter
This commit is contained in:
@@ -148,6 +148,10 @@ var Game = {
|
||||
this.heatPlate.onChangeDialLevel(dialLevel);
|
||||
},
|
||||
|
||||
setClickEnable: function(value) {
|
||||
this.isEnableClick = value;
|
||||
},
|
||||
|
||||
back: function() {
|
||||
sessionStorageManager.resetPlayingAppData();
|
||||
location.href = '../../web/client/main_menu.html';
|
||||
@@ -188,6 +192,7 @@ var Game = {
|
||||
this.playingStageNo = 1;
|
||||
this.clearedMeatCount = 0;
|
||||
this.badMeatCount = 0;
|
||||
this.badMeatCountPrevStage = 0;
|
||||
|
||||
this.startStage();
|
||||
this.realtimeStageTimer.start();
|
||||
@@ -195,30 +200,29 @@ var Game = {
|
||||
|
||||
startStage: function() {
|
||||
this.clearedMeatCount = 0;
|
||||
this.activatedMeatCount = this.getStageMeatCount();
|
||||
this.serveNormalMeats();
|
||||
this.activatedMeatCount = this.playingStageNo + 2;
|
||||
|
||||
this.serveBonusMeat();
|
||||
this.badMeatCountPrevStage = this.badMeatCount;
|
||||
this.badMeatCount = 0;
|
||||
|
||||
if(this.playingStageNo > 1)
|
||||
if(this.playingStageNo > 1) {
|
||||
this.waiter.animateServing();
|
||||
game.time.events.add(Waiter.SERVING_WAIT_TIME_MS, this.serveMeats, this);
|
||||
} else {
|
||||
this.serveMeats();
|
||||
}
|
||||
},
|
||||
|
||||
setClickEnable: function(value) {
|
||||
this.isEnableClick = value;
|
||||
},
|
||||
|
||||
getStageMeatCount: function() {
|
||||
this.activatedMeatCount = this.playingStageNo + 2;
|
||||
return this.activatedMeatCount;
|
||||
serveMeats: function() {
|
||||
this.serveBonusMeat();
|
||||
this.serveNormalMeats();
|
||||
},
|
||||
|
||||
serveBonusMeat: function() {
|
||||
if(this.playingStageNo == 1)
|
||||
return;
|
||||
|
||||
if(this.badMeatCount > 0)
|
||||
if(this.badMeatCountPrevStage > 0)
|
||||
return;
|
||||
|
||||
if(this.bonusMeat.isActivate())
|
||||
|
||||
Reference in New Issue
Block a user