Ejemplo n.º 1
0
    void GenerateItems()
    {
        //Shuffle the info list - to generate items in different order - mix
        for (int infoIndex = 0; infoIndex < itemInfos.Count; infoIndex++)
        {
            ItemInfos temp        = itemInfos[infoIndex];
            int       randomIndex = Random.Range(infoIndex, itemInfos.Count);
            itemInfos[infoIndex]   = itemInfos[randomIndex];
            itemInfos[randomIndex] = temp;
        }

        //Create Items
        itemsPanel.CreateItems(itemInfos);
    }