disable sg2083 and pan camera over to fami when defeated

This commit is contained in:
Haze Weathers 2024-02-29 00:40:38 -05:00
parent 12d6adaf94
commit 3ff2f837d8
5 changed files with 32 additions and 4 deletions

View file

@ -1,6 +1,7 @@
extends Node2D
signal died()
signal health_changed(amount)
@ -45,10 +46,14 @@ func stop_push() -> void:
func hurt(amount: float) -> void:
if hp <= 0.0:
return
hp -= amount
hp = max(hp, 0.0)
emit_signal("health_changed", hp)
if hp <= 0.0:
state_chart.send_event("die")
emit_signal("died")
func _attack() -> void: