private void SetupInventoryList()
    {
        currentInventoryList.DestroyListItems();

        List <Item> items         = FindObjectOfType <PlayerData>().GetPlayerItems();
        List <Item> filteredItems = new List <Item>();

        foreach (Item item in items)
        {
            if (currentFilters.Contains(item.GetItemType()))
            {
                filteredItems.Add(item);
            }
        }

        currentInventoryList.SetupInventoryList(fields, filteredItems, ItemDetailsMenu.ItemDetailMenuContextType.Loadout);

        if (!waitingToEquip)
        {
            SelectEquippedItemInList();
        }
        else
        {
            currentInventoryList.SelectParticularItem(selectedItem);
        }
    }
    private void SetupInventoryList()
    {
        inventoryList.DestroyListItems();

        CheckFilters();

        List <Item> items         = FindObjectOfType <PlayerData>().GetPlayerItems();
        List <Item> filteredItems = new List <Item>();

        foreach (Item item in items)
        {
            if (currentFilters.Contains(item.GetItemType()))
            {
                filteredItems.Add(item);
            }
        }
        inventoryList.SetupInventoryList(fields, filteredItems, ItemDetailsMenu.ItemDetailMenuContextType.Inventory);
    }
Esempio n. 3
0
 private void SetupInventoryList(List <Item> items)
 {
     inventoryList.DestroyListItems();
     inventoryList.SetupInventoryList(fields, items, ItemDetailsMenu.ItemDetailMenuContextType.Shop);
 }