コード例 #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);
        }
コード例 #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;
            }
        }
コード例 #3
0
ファイル: PickupItem.cs プロジェクト: Aleetus/Team_Alpha
 public void InspectLootBox(LootBox lootBox)
 {
     inventory.SearchLootBox(lootBox);
 }