From 8b95376a90c41424ac271309932ba2c0e4555994 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Sat, 24 Mar 2018 15:59:23 +0100 Subject: [PATCH] Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 39 bytes modified --- 21g30t1e75.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/21g30t1e75.js b/21g30t1e75.js index bbd3e04..28000fe 100644 --- a/21g30t1e75.js +++ b/21g30t1e75.js @@ -1235,12 +1235,13 @@ GameLib.CustomCode.prototype.powerup = function(gameObject) { if (gameObject.type === GameLib.CustomCode.POWERUP_LIFE) { - this.lives += 1; + this.state.lives += 1; - if (this.lives > 3) { - this.lives = 3; + if (this.state.lives > 3) { + this.state.lives = 3; } + this.displayHUD(); } if (gameObject.type === GameLib.CustomCode.POWERUP_SPEED) {