18 lines
573 B
GDScript3
18 lines
573 B
GDScript3
|
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)
|