24 lines
711 B
GDScript
24 lines
711 B
GDScript
class_name UI extends Control
|
|
@onready var health = $VBoxContainer/HBoxContainer/MarginContainer/health
|
|
@onready var timer = $VBoxContainer/HBoxContainer/MarginContainer2/timer
|
|
@onready var coins = $VBoxContainer/HBoxContainer/MarginContainer3/coins
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready():
|
|
pass # Replace with function body.
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _process(delta):
|
|
pass
|
|
|
|
func healthUpdate(currentHealth, maxHealth):
|
|
health.text = "Health: "+str(currentHealth)
|
|
|
|
func timerUpdate(timeRemaining):
|
|
timer.text=str(timeRemaining)
|
|
|
|
func coinUpdate(coinsRemaining):
|
|
coins.text = "Coins: "+str(coinsRemaining)
|