instructions for player death

This commit is contained in:
OddlyTimbot committed 2024-10-01 20:16:45 -04:00
1 parent 723d677a81
commit 7f4bc01dbe
2 files changed
+82 -6

No files matched your search

+5 -5
View File
@@ -18,11 +18,11 @@ func resetPlayer():
player.health = player.max_health
func playerDamage():
#one can not kill what is dead....
if player.health >0:
player.health -= 20
#is the player dead?
if player.health <= 0:
#kill him
playerDeath.emit()
#is the player dead?
if player.health <= 0:
#kill him
playerDeath.emit()