Update health component with reset func to set health back to max

This commit is contained in:
sean.s.mclaughlan 2024-04-08 18:59:50 -07:00
parent dca6954ad6
commit 6887210fcf

View file

@ -15,6 +15,9 @@ func damage(amount : int):
if health <= 0:
health_zeroed.emit()
func reset():
health = max_health
func _on_area_entered(area):
if area is AreaDamageComponent:
damage(area.damage)