Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 39 bytes modified
parent
2fb83634be
commit
8b95376a90
|
@ -1235,12 +1235,13 @@ GameLib.CustomCode.prototype.powerup = function(gameObject) {
|
||||||
|
|
||||||
if (gameObject.type === GameLib.CustomCode.POWERUP_LIFE) {
|
if (gameObject.type === GameLib.CustomCode.POWERUP_LIFE) {
|
||||||
|
|
||||||
this.lives += 1;
|
this.state.lives += 1;
|
||||||
|
|
||||||
if (this.lives > 3) {
|
if (this.state.lives > 3) {
|
||||||
this.lives = 3;
|
this.state.lives = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.displayHUD();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gameObject.type === GameLib.CustomCode.POWERUP_SPEED) {
|
if (gameObject.type === GameLib.CustomCode.POWERUP_SPEED) {
|
||||||
|
|
Loading…
Reference in New Issue