Example #1
0
        /// <summary>
        /// Start is called on the frame when a script is enabled just before
        /// any of the Update methods is called the first time.
        /// </summary>
        void Start()
        {
            // PlayerPrefs.SetString("Save", "");
            gameProgressManager.LoadSave();

            if (!gameProgressManager.loaded)
            {
                mazeGenerator.BeginMazeGeneration("seed" + new System.Random().Next(0, 9999999));
            }
            else
            {
                mazeGenerator.OnGeneratingComplete += RestoreFromSave;

                mazeGenerator.BeginMazeGeneration(gameProgressManager.currentSave.mazeSeed);
            }
        }