Esempio n. 1
0
    void Start()
    {
        LoadAll();
        PlayerInventory = new List <PlayerItem>();

        for (int i = 0; i < Icons.Count; i++)
        {
            PlayerItem newItem = new PlayerItem();
            newItem.iconSprite = Icons[i % Icons.Count()];

            PlayerInventory.Add(newItem);
        }

        playerInventory = playerInventory.OrderBy(x => x.iconSprite.name).ToList();
        GenInventory(PlayerInventory);
    }