|
|
@ -1,24 +1,15 @@ |
|
|
|
class_name QuickSlots |
|
|
|
extends Node |
|
|
|
|
|
|
|
#region Singleton |
|
|
|
static var ref: QuickSlots |
|
|
|
|
|
|
|
func _init() -> void: |
|
|
|
if not ref: |
|
|
|
ref = self |
|
|
|
else: |
|
|
|
queue_free() |
|
|
|
var _items: Array[String] = ["001", "002", "003", "004"] |
|
|
|
var _selected_item: int = 0 |
|
|
|
|
|
|
|
|
|
|
|
func _init() -> void: |
|
|
|
InventoryManager.next_quick_slot.connect(select_next_item.bind()) |
|
|
|
InventoryManager.previous_quick_slot.connect(select_previous_item.bind()) |
|
|
|
InventoryManager.select_quick_slot.connect(select_item_index.bind()) |
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
var _items: Array[String] = ["001", "002", "003", "004"] |
|
|
|
var _selected_item: int = 0 |
|
|
|
|
|
|
|
|
|
|
|
func _unhandled_input(event: InputEvent) -> void: |
|
|
|
if event.is_action_pressed("quickslot0"): |
|
|
|