Exemple #1
0
        private void InitLevel()
        {
            if (grid != null)
            {
                Destroy(grid.gameObject);
            }
            grid = LevelBuilder.CreateGrid(settings.CurrentLevel);
            grid.OnPuzzleSolved += EndLevel;

            switch (grid.MaxElevation)
            {
            case 1:
                themeManager.SwitchTheme(themeManager.LightTheme);
                break;

            case 2:
                themeManager.SwitchTheme(themeManager.MediumTheme);
                break;

            case 3:
                themeManager.SwitchTheme(themeManager.DarkTheme);
                break;
            }

            OnLevel(settings.CurrentLevel);
            Invoke("StartLevel", levelTextTransitionTime);
        }