player: revamp health system #4
1 changed files with 4 additions and 2 deletions
|
|
@ -25,11 +25,13 @@ func resize_ui():
|
||||||
$HUD.position.y = size.y - hud_h
|
$HUD.position.y = size.y - hud_h
|
||||||
|
|
||||||
func make_hud():
|
func make_hud():
|
||||||
var text = "Holding " + $Pivot/Container/Gear.gear_name()
|
var text = ""
|
||||||
for node in $Backpack.get_children():
|
for node in $Backpack.get_children():
|
||||||
if not node is Gear:
|
if not node is Gear:
|
||||||
continue
|
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
|
$HUD.text = text
|
||||||
|
|
||||||
func message(string):
|
func message(string):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue