Exemple #1
0
    void Add()
    {
        if (!inventory.itemsList.Contains(item))
        {
            for (int i = 0; i < inventory.itemsList.Count; i++)
            {
                if (inventory.itemsList[i] == null)
                {
                    inventory.itemsList[i] = item;

                    break;
                }
            }
        }
        else
        {
            item.itemCount++;
        }
        BagManager.Refresh();
    }