コード例 #1
0
    public void AddWearable(WearableItem wearableItem, int amount)
    {
        if (wearableItem == null)
        {
            return;
        }

        if (!selectorsByCategory.ContainsKey(wearableItem.category))
        {
            Debug.LogError($"Category couldn't find selector for category: {wearableItem.category} ");
            return;
        }

        selectorsByCategory[wearableItem.category].AddItemToggle(wearableItem, amount);
        if (wearableItem.IsCollectible())
        {
            collectiblesItemSelector.AddItemToggle(wearableItem, amount);
        }
    }