Beispiel #1
0
        public void StartButtonPressed()
        {
            Debug.Log("pressed start button");
            m_questionManager = QuestionManager.GetQuestionManager();
            m_audioManager    = AudioManager.GetAudioManager();
            m_settingsManager = SettingsManager.GetSettingsManager();
            m_settingsManager.ResetSettings();

            PlayerProgress playerProgress = PlayerProgress.GetPlayerProgress();

            if (playerProgress.TotalPlayerScore() == 0)
            {
                // player is completely new. Go straight into the game with the first quiz.
                QuestionManager qm = QuestionManager.GetQuestionManager();
                qm.SetQuiz(0, 0);
                string sceneName = qm.GetQuizSceneNameForCurrentMode();
                Debug.Log("scene name : " + sceneName);

                SceneManager.LoadScene(sceneName);
            }
            else
            {
                // player has played the game before. Go into level select.
                SceneManager.LoadScene("jigsaw Level Select");
            }
        }
        public void SelectedLevel(string levelName)
        {
            Debug.Log("**** Selected level " + levelName);
            _questionManager.SetQuiz(levelName);
            string sceneName = _questionManager.GetQuizSceneNameForCurrentMode();

            Application.LoadLevel(sceneName);
        }