class_name InventoryComponent extends Node var toggled: bool = false @onready var inventory_menu = UiManager.inventory_menu signal toggle(toggle: bool) func _process(delta: float) -> void: if not Console.toggled: if Input.is_action_just_pressed("open_inventory"): if toggled: print("toggle off") toggle.emit(false) else: print("toggle on") toggle.emit(true) toggled = !toggled #func _process(delta: float) -> void: #if Input.is_action_just_pressed("open_inventory"): #if toggled: #print("toggle off") #UiManager.toggle_inventory_menu(false) #toggle.emit(false) #else: #print("toggle on") #UiManager.toggle_inventory_menu(true) #toggle.emit(true) #toggled = !toggled