JuneGame/scripts/ui.gd

19 lines
621 B
GDScript3
Raw Normal View History

extends Control
@onready var health: Label = $VBoxContainer/HBoxContainer/MarginContainer/Health
@onready var timer: Label = $VBoxContainer/HBoxContainer/MarginContainer2/Timer
@onready var coins: Label = $VBoxContainer/HBoxContainer/MarginContainer3/Coins
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass
func healthUpdate(healthRemaining):
health.text = "Health: "+str(healthRemaining)
func timerUpdate(timeRemaining):
timer.text = str(timeRemaining)
func coinsUpdate(coinsRemaining, startingCoins):
coins.text="Coins: "+str(coinsRemaining)+"/"+str(startingCoins)