12 lines
380 B
GDScript3
12 lines
380 B
GDScript3
|
extends Control
|
||
|
@onready var health = $VBoxContainer/HBoxContainer/MarginContainer/Health
|
||
|
@onready var coins = $VBoxContainer/HBoxContainer/MarginContainer2/Coins
|
||
|
|
||
|
func _ready():
|
||
|
coinUpdate(GameManager.coinCollectedTotal)
|
||
|
healthUpdate(GameManager.player.health)
|
||
|
func healthUpdate(amt):
|
||
|
health.text = "Health : "+str(amt)
|
||
|
func coinUpdate(amt):
|
||
|
coins.text = "Coins : "+str(amt)
|