예제 #1
0
    private int SetSlots(IList <ItemAmount> itemAmountList, int slotIndex)
    {
        for (int i = 0; i < itemAmountList.Count; i++, slotIndex++)
        {
            ItemAmount    itemAmount = itemAmountList[i];
            InventorySlot itemSlot   = itemSlots[slotIndex];

            tempSprite           = Resources.LoadAll <Sprite>("ItemSprites/Original_items");
            itemSlot.icon.sprite = tempSprite[itemAmount.Item.indexOnSheet];
            itemSlot.AddCount(itemAmount.Amount);
            itemSlot.icon.enabled = true;
            itemSlot.transform.parent.gameObject.SetActive(true);
        }

        return(slotIndex);
    }