Exemplo n.º 1
0
        /// <summary>
        /// Complex method to inspect lootboxes
        /// </summary>
        /// <param name="lootBox"></param>
        public void SearchLootBox(LootBox lootBox)
        {
            //Changing inventory state
            inventoryManager.mode          = InventoryManager.ActiveMode.loot;
            InventoryManager.showInventory = true;

            //Making a reference to current lootbox in order to restore left items on inspection end
            activeLootBox = lootBox;

            //Adding an items to loot window in order to interact with them
            AddItemsToLoot(activeLootBox.lootBoxItems);
        }
Exemplo n.º 2
0
        private void Update()
        {
            if (!InventoryManager.showInventory && activeLootBox != null)
            {
                activeLootBox.lootBoxItems = new List <Item>();

                if (FindItemsLeftInLoot() != null)
                {
                    foreach (var item in FindItemsLeftInLoot())
                    {
                        activeLootBox.lootBoxItems.Add(item.item);
                        RemoveInventoryItem(item);
                    }
                }
                activeLootBox = null;
            }
        }
Exemplo n.º 3
0
 public void InspectLootBox(LootBox lootBox)
 {
     inventory.SearchLootBox(lootBox);
 }