player: revamp health system #4

Merged
jeremy merged 4 commits from health into master 2026-01-22 21:25:17 +13:00
Showing only changes of commit 5b8d7fdcce - Show all commits

View file

@ -25,11 +25,13 @@ func resize_ui():
$HUD.position.y = size.y - hud_h
func make_hud():
var text = "Holding " + $Pivot/Container/Gear.gear_name()
var text = ""
for node in $Backpack.get_children():
if not node is Gear:
continue
text += "\n%s (%s)" % [node.gear_name(), node.name]
text += "%s (%s)\n" % [node.gear_name(), node.name]
text += "Holding " + $Pivot/Container/Gear.gear_name() + "\n"
text += str(health) + " hp"
$HUD.text = text
func message(string):