projects
/
ld40.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1960484
)
Fix healthbar not showing 0 when killed
author
MegaBrutal
<code+git@megabrutal.com>
Fri, 29 Dec 2017 19:15:00 +0000
(20:15 +0100)
committer
MegaBrutal
<code+git@megabrutal.com>
Fri, 29 Dec 2017 19:15:00 +0000
(20:15 +0100)
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
patch
|
blob
|
history
diff --git
a/ld40.js
b/ld40.js
index f7954c2a7d4a0ae5239f12a0094744b2cafe8b7b..e981a9ef0768c78a6868a9e8c0ffdbae3f066660 100644
(file)
--- 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;