From c4f64f706554a2155a3a4d2ca1832f0cf26fc99f Mon Sep 17 00:00:00 2001 From: "sean.s.mclaughlan" Date: Mon, 8 Apr 2024 18:59:50 -0700 Subject: [PATCH] Update health component with reset func to set health back to max --- components/health_component.gd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/health_component.gd b/components/health_component.gd index f2e2a4b..d6bcade 100644 --- a/components/health_component.gd +++ b/components/health_component.gd @@ -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)