Ejemplo n.º 1
0
    public void CreateCluster() //--------------------------------- creates cluster and check if one of each items exists
    {
        cluster.points = objectList;
        cluster.Points = objectNumber;
        cluster.newStart();

        if (cluster.finished && !cluster.CheckOneOfEach()) // -----------------------if it cant find one of each it starts again
        {
            foreach (GameObject obj in objectList)
            {
                Destroy(obj);
            }
            objectList.Clear();
            objectNumber = 0;

            CreateObjects();
            CreateCluster();
        }
    }