fixed inventory + using Sync bindings
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 57s
Create tag and build when new code gets to main / Export (push) Successful in 5m13s

This commit is contained in:
2026-05-04 10:19:00 +02:00
parent 99f383be00
commit bed1384dc7
13 changed files with 258 additions and 124 deletions

View File

@@ -21,6 +21,8 @@ extends Node
@onready var inventory_layer: CanvasLayer = $"../InventoryLayer"
@onready var player: PlayerController = $"../Player"
var inventory: OverlaidMenu = null
func _ready() -> void:
toolbox_action.triggered.connect(open_toolbox)
inventory_action.triggered.connect(open_inventory)
@@ -37,9 +39,11 @@ func open_toolbox() -> void:
debug_layer.call_deferred("add_child", toolbox)
func open_inventory() -> void:
var inventory: Control = open_overlaid_menu(inventory_scene)
# inventory.player = player
inventory_layer.call_deferred("add_child", inventory)
if inventory == null:
inventory = open_overlaid_menu(inventory_scene)
inventory_layer.call_deferred("add_child", inventory)
return
inventory.show_menu()
func on_player_died() -> void:
var lost_menu: LevelLostMenu = open_overlaid_menu(lost_menu_scene)