instructions for player death
This commit is contained in:
1 parent
723d677a81
commit
7f4bc01dbe
2 files changed
+82
-6
No files matched your search
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user