player: display health in HUD
This commit is contained in:
parent
df449af0f3
commit
47aa5ac9aa
1 changed files with 4 additions and 2 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue