Example #1
0
    public void DisplayInventory(Player _player)
    {
        player    = _player;
        maxWeight = 50.0f + player.Characteristics.Strength * 2f;
        shopMode  = ShopMode.Buying;
        if (inventoryType == InterfaceType.OtherInventory || inventoryType == InterfaceType.Shop)
        {
            lowerBar.ShowTakeAllButton();
        }
        gameObject.SetActive(true);

        gold = player.PlayerInventory.Gold;

        filterList.AddButtonFavorite();
        filterList.AddButtonAll().SelectButton();
        DisplayAll();

        List <Item.ItemType> typeAlreadyHere = new List <Item.ItemType>();

        foreach (Item item in items.Keys)
        {
            if (!typeAlreadyHere.Contains(item.EnumItemType))
            {
                filterList.AddButtonFilter(item);

                typeAlreadyHere.Add(item.EnumItemType);
            }
        }
        lowerBar.UpdateGoldLabel();
    }