18 lines
540 B
GDScript
18 lines
540 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:
|
|
health.text = "Health 100"
|
|
|
|
func healthUpdate(currentHealth, maxHealth):
|
|
health.text = "Health"+str(currentHealth)
|
|
|
|
func coinsUpdate(amt) -> void:
|
|
coins.text = "Coins "+str(amt)
|
|
|
|
func timerUpdate(timeRemaining)-> void:
|
|
timer.text = str(timeRemaining)
|