/// <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); }
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; } }
public void InspectLootBox(LootBox lootBox) { inventory.SearchLootBox(lootBox); }