Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 189 bytes modified
parent
7429de0943
commit
d510bc9cee
|
@ -832,11 +832,20 @@ GameLib.CustomCode.prototype.createFood = function(delta) {
|
||||||
|
|
||||||
GameLib.CustomCode.prototype.gameOver = function(won) {
|
GameLib.CustomCode.prototype.gameOver = function(won) {
|
||||||
this.state.gameOver = true;
|
this.state.gameOver = true;
|
||||||
|
|
||||||
|
if (won) {
|
||||||
this.state.message = {
|
this.state.message = {
|
||||||
text : "GAME OVER",
|
text: "YOU WON!",
|
||||||
x : 127,
|
x: 127,
|
||||||
y : 256
|
y: 256
|
||||||
};
|
};
|
||||||
|
} else {
|
||||||
|
this.state.message = {
|
||||||
|
text: "GAME OVER",
|
||||||
|
x: 127,
|
||||||
|
y: 256
|
||||||
|
};
|
||||||
|
}
|
||||||
this.displayHUD();
|
this.displayHUD();
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue