boss3 health bars

This commit is contained in:
Haze Weathers 2024-02-12 00:03:10 -05:00
parent 1274e989b4
commit 21181a24c8
4 changed files with 85 additions and 1 deletions

View file

@ -1,6 +1,9 @@
extends Node2D
signal health_changed(amount)
export var push_speed: float = 60.0
export var chase_speed: float = 40.0
export var breath_dps: float = 50.0
@ -43,6 +46,7 @@ func stop_push() -> void:
func hurt(amount: float) -> void:
hp -= amount
emit_signal("health_changed", hp)
if hp <= 0.0:
state_chart.send_event("die")