void populateShop(ShopItem[] items) { for (int i = 0; i < itemSlots.Length; i++) { ShopItemSlot itemSlot = itemSlots[i]; itemSlot.Init(items[i], amountSelector); } }
//method to delcare the item slots in shop public void SelectItem(int index) { ShopItemSlot slot = inventorySlots[index]; SelectItem(slot.GetItem()); }