public void CreateSlots() { for (int i = 0; i < bag.GetSlotCount(); i++) { GameObject _slotIns = Instantiate(slotPref, container.transform); SlotController _slotController = _slotIns.GetComponent <SlotController>(); _slotController.SetSlotID(i); _slotController.SetContainerItemType(ItemType.Bag); } }
void CreateSlots() { int _amountOfSlots = equipment.GetSlotData().GetAmountOfSlots(); for (int i = 0; i < _amountOfSlots; i++) { GameObject _slotIns = Instantiate(slotPref, container.transform); SlotController _slotController = _slotIns.GetComponent <SlotController>(); _slotController.SetSlotID(i); _slotController.SetContainerItemType(ItemType.Equipment); } }