Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 110 bytes modified
parent
1268482093
commit
8a4faac2e9
|
@ -157,7 +157,8 @@ this.state = {
|
|||
exploding : false,
|
||||
lives : 3,
|
||||
getReady : false,
|
||||
message : null
|
||||
message : null,
|
||||
gameOver : false
|
||||
};
|
||||
|
||||
GameLib.CustomCode.prototype.displayHUD = function() {
|
||||
|
@ -228,12 +229,18 @@ GameLib.CustomCode.prototype.waitReload = function(delta) {
|
|||
*/
|
||||
console.warn('reverting to good state');
|
||||
|
||||
this.displayHUD();
|
||||
|
||||
this.restore();
|
||||
|
||||
this.state.exploding = false;
|
||||
|
||||
if (this.lives < 0) {
|
||||
this.state.gameOver = true;
|
||||
this.state.message = "GAME OVER";
|
||||
return;
|
||||
}
|
||||
|
||||
this.displayHUD();
|
||||
|
||||
this.restore();
|
||||
|
||||
this.state.getReady = true;
|
||||
|
||||
window.setTimeout(
|
||||
|
@ -973,7 +980,7 @@ GameLib.CustomCode.prototype.explode = function(position) {
|
|||
this.particleEnginePickle.updateInstance('position');
|
||||
|
||||
this.particleEnginePickle.enabled = true;
|
||||
|
||||
|
||||
}.bind(this)
|
||||
|
||||
/**
|
||||
|
@ -1547,7 +1554,7 @@ GameLib.Event.Subscribe(
|
|||
lives : 3,
|
||||
getReady : false,
|
||||
message : null,
|
||||
overrideOrientation : false
|
||||
gameOver : false
|
||||
};
|
||||
|
||||
this.initializeGrid();
|
||||
|
|
Loading…
Reference in New Issue