stamina and health bar

This commit is contained in:
Michael Campbell 2026-03-04 17:17:57 -05:00
parent d17b16ad5b
commit 5b417b540b
9 changed files with 184 additions and 10 deletions

16
player/health_bar.gd Normal file
View file

@ -0,0 +1,16 @@
extends Control
func _ready() -> void:
get_parent().modulate.a = 0.
func update(value: int) -> void:
if value == 3: return
get_parent().modulate.a = 1.
for child in get_children():
child.visible = value > 0
value -= 1
create_tween() \
.tween_property(get_parent(), "modulate:a", 0., 1.) \
.set_delay(2.)