adds collision to spawned monsters, moves player position 3 units back

This commit is contained in:
Luca 2024-09-19 20:48:54 +02:00
parent f025f89401
commit e8f06e7b99
12 changed files with 251 additions and 121 deletions

13
scripts/inventory.gd Normal file
View 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")