Blud_Mage/Scenes/Spawnables/UI/SpawnableUI.gd
2023-10-10 19:38:24 -04:00

11 lines
277 B
GDScript

extends Control
@onready var healthBar : ProgressBar = $HealthBar
@onready var hpLabel : Label = $HealthBar/HP
func setHP(currentHp, maxHp):
healthBar.min_value = 0
healthBar.max_value = maxHp
healthBar.value = currentHp
hpLabel.text = str(currentHp) + "/" + str(maxHp)