From 7ce54d871c6931882855c54de3c0c24cc8023140 Mon Sep 17 00:00:00 2001 From: MegaBrutal Date: Fri, 29 Dec 2017 20:15:00 +0100 Subject: [PATCH] Fix healthbar not showing 0 when killed When the player died, the healthbar showed some HP value which confused some players (some of them didn't realize that they died). modified: ld40.js --- ld40.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ld40.js b/ld40.js index f7954c2..e981a9e 100644 --- a/ld40.js +++ b/ld40.js @@ -73,6 +73,12 @@ } } + kill() { + this.health = 0; + this.healthBar.update(this.love, this.maxHealth, this.health); + super.kill(); + } + loveUp() { this.love++ this.maxHealth += this.love; -- 2.34.1