GodotGame/scripts/ui.gd

15 lines
390 B
GDScript3
Raw Normal View History

2024-08-20 01:07:42 +00:00
extends Control
@onready var health = $VBoxContainer/HBoxContainer/MarginContainer/Health
@onready var coins = $VBoxContainer/HBoxContainer/MarginContainer2/Coins
#func _ready():
#coinsUpdate(GameManager.coinCollectedTotal)
#healthUpdate(GameManager.player.health)
func healthUpdate(amt):
health.text = "Health: " + str(amt)
func coinsUpdate(amt):
coins.text = "Coins: " + str(amt)