Example #1
0
        private void OnItemRemovedToInventory(EventItemWasRemovedFromInventory e)
        {
            if (e.UpdateUI == false)
            {
                Debug.Log("received event on ui but we should not update");
                return;
            }

            if (e.InventoryUUID == InventoryUUID && e.UpdateUI)
            {
                TheSlotsContainer.RemoveItemByUUID(e.Item.BaseData.UniqueUUID);
            }
        }
Example #2
0
        private void AddItem(IItem item, bool updateUI)
        {
            if (TheInventory == null)
            {
                Debug.LogWarning("The inventory is null... Is this a network ui object??");
                return;
            }

            UISlot slot = TheSlotsContainer.GetSlot();

            if (slot)
            {
                slot.UpdateSlotItem(item, updateUI);
            }
            else
            {
                Debug.LogError("The slot is null.. is the inventory full???");
            }
        }