18 lines
573 B
GDScript
18 lines
573 B
GDScript
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
|
|
|
|
func _ready() -> void:
|
|
pass
|
|
|
|
func healthUpdate(currentHealth, maxHealth) -> void:
|
|
health.text = "Health: "+str(currentHealth)+"/"+str(maxHealth)
|
|
|
|
func coinsUpdate(currentCoins) -> void:
|
|
coins.text = "Coins: "+str(currentCoins)
|
|
|
|
func timerUpdate(currentTimer) -> void:
|
|
timer.text = "Timer: "+str(currentTimer)
|