Fix Sorting In-Game UI
parent
d15f1c528f
commit
99c56fb46f
|
@ -13,7 +13,7 @@ script = ExtResource( 2 )
|
||||||
use_parent_material = true
|
use_parent_material = true
|
||||||
frames = ExtResource( 1 )
|
frames = ExtResource( 1 )
|
||||||
animation = "idle"
|
animation = "idle"
|
||||||
frame = 3
|
frame = 1
|
||||||
playing = true
|
playing = true
|
||||||
centered = false
|
centered = false
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,6 @@ func return_to_menu():
|
||||||
|
|
||||||
func add_health(amount):
|
func add_health(amount):
|
||||||
health = clamp(health + amount, 0, 3)
|
health = clamp(health + amount, 0, 3)
|
||||||
get_tree().get_root().get_node("Game/UIWrapper/UI/Health/HealthSprite").frame = health
|
get_tree().get_root().get_node("Game/UIWrapper/UI/Left/Health/HealthSprite").frame = health
|
||||||
if health == 0:
|
if health == 0:
|
||||||
return_to_menu() # TODO endgame
|
return_to_menu() # TODO endgame
|
||||||
|
|
Loading…
Reference in New Issue