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