better spawn, heart ui, dash, new map
This commit is contained in:
parent
ce27965422
commit
34be761164
16 changed files with 137 additions and 171 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue