adds collision to spawned monsters, moves player position 3 units back
This commit is contained in:
parent
f025f89401
commit
e8f06e7b99
12 changed files with 251 additions and 121 deletions
13
scripts/inventory.gd
Normal file
13
scripts/inventory.gd
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
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")
|
||||
Loading…
Add table
Add a link
Reference in a new issue