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 f86f62ca9a
commit c4f64f7065

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)