mirror of
https://gitlab.com/open-fpsz/open-fpsz.git
synced 2026-01-19 19:44:46 +00:00
Update health component with reset func to set health back to max
This commit is contained in:
parent
f86f62ca9a
commit
c4f64f7065
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue