mirror of
https://github.com/omegaleo/Tutorials.git
synced 2026-11-08 17:43:27 +00:00
Added Inventory System
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
extends Control
|
||||
class_name InventoryControllerGD
|
||||
|
||||
@export var inventory : InventoryGD
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
# Obtain all InventorySlot objects and initialize with an index
|
||||
var inventory_slots = get_tree().get_nodes_in_group("inventory_slots")
|
||||
|
||||
for i in inventory_slots.size():
|
||||
var slot = inventory_slots[i]
|
||||
slot.initialize_slot(i, inventory)
|
||||
Reference in New Issue
Block a user