mirror of
https://github.com/omegaleo/Tutorials.git
synced 2026-11-08 17:43:27 +00:00
18 lines
418 B
C#
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);
|
|
}
|
|
}
|
|
} |