better spawn, heart ui, dash, new map

This commit is contained in:
Daniel Kauss Serna 2026-02-20 17:47:53 +01:00
parent ce27965422
commit 34be761164
16 changed files with 137 additions and 171 deletions

View file

@ -1,9 +1,16 @@
extends TextureRect
extends Control
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
EventBus.health_changed.connect(_on_health_changed)
_on_health_changed(3)
func _on_health_changed(new : int):
texture.region = Rect2(0, new * 32, 0, 32)
var i = 0;
for c : HealthHeart in get_children():
print(i, new)
if i < new:
c.set_full()
else:
c.set_empty()
i += 1