13 lines
408 B
GDScript
13 lines
408 B
GDScript
extends Control
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready() -> void:
|
|
Inventory.connect("inventory_changed", update_inventory)
|
|
pass # Replace with function body.
|
|
|
|
func update_inventory() -> void:
|
|
var m = Inventory.monsters[0]
|
|
var string = "%s Lvl %s, %s/%s" % [m.name, m.level, m.health, m.max_health]
|
|
$MonsterList/Monster1.text = string
|
|
print("Updating inventory")
|