Files
GodotTutorials/Inventory/CSharp/InventoryController.cs
T
2026-08-29 23:24:04 +01:00

18 lines
418 B
C#

using Godot;
public partial class InventoryController : Control
{
[Export] public Inventory Inventory;
public override void _Ready()
{
var inventorySlots = GetTree().GetNodesInGroup("inventory_slots_cs");
for (int i = 0; i < inventorySlots.Count; i++)
{
var slot = (InventorySlot)inventorySlots[i];
slot.InitializeSlot(i, Inventory);
}
}
}