public static void Equip(GameObject what, ShopSlotController.ItemType type) { int slotNo = 0; if (type == ShopSlotController.ItemType.utility) slotNo = 1; instance.inventory[slotNo] = what; }
public void updateShopSlots() { int index = 0; foreach (Transform child in shopSystemPanel.transform) { ShopSlotController instance = child.GetComponent <ShopSlotController>(); if (index < availableItems.Count && instance != null) { instance.item = availableItems[index]; instance.UpdateInfo(); } else if (instance != null) { instance.item = null; instance.UpdateInfo(); } index++; } }