Esempio n. 1
0
        private void ResetMatrix()
        {
            if (gameMatrix != null)
            {
                List <GameObject> cubesFromPrevRound = gameMatrix.GetLeftOversCubes();
                cubesFromPrevRound.AddRange(gameMatrix.GetOverStacked());
                for (int i = cubesFromPrevRound.Count - 1; i >= 0; i--)
                {
                    Destroy(cubesFromPrevRound[i]);
                }
            }

            gameMatrix = new GameMatrix(matrixDimensions);
        }