player: add health callbacks

Allows us to update the HUD on health change
This commit is contained in:
Jeremy Baxter 2026-01-22 21:11:05 +13:00 committed by jeremy
parent 47aa5ac9aa
commit e6cbaba0fa
2 changed files with 19 additions and 5 deletions

View file

@ -2,4 +2,4 @@ extends Area3D
func _on_body_entered(body: Node3D):
if body is Player:
body.health = 0
body.die()