예제 #1
0
        public void SetLevel(Level newLevel, bool onlySet = false)
        {
            Debug.LogFormat("SetLevel {0}, onlySet: {1}", newLevel, onlySet);
            CleanupLevel();

            CurrentLevel = newLevel;
            CurrentLevel.Init();

            if (onlySet)
            {
                return;
            }

            puzzles = GetPuzzles();
            NextPuzzle();

            CanProcessInput = true;

            LevelSet?.Invoke(CurrentArgs);

            LevelManager.Instance.SetLevelPlayed(newLevel);
        }