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

View file

@ -1,12 +1,19 @@
extends Node
# SIGNALS
signal inventory_changed
# The players current monsters in the inventory are saved here
var monsters: Array
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
print("Hello from Inventory")
pass # Replace with function body.
setup_new_inventory()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func setup_new_inventory() -> void:
var stats = MonsterStats.new()
stats.manual_init()
monsters.append(stats)
# debug timeout to wait for the debug UI
await get_tree().create_timer(1.0).timeout
inventory_changed.emit()