Пример #1
0
 public void GoToMainMenu()
 {
     if (NameText.activeSelf && NameInputField.activeSelf)
     {
         Debug.Log("Name Entered: " + NameInputField.GetComponent <InputField>().text);
         HighScoreController.AddHighscoreEntry(PlayerPrefs.GetInt("HighScore", Score.score), NameInputField.GetComponent <InputField>().text);
     }
     SceneManager.LoadScene(mainMenuSceneName);
 }
Пример #2
0
 public void RestartGame()
 {
     if (NameText.activeSelf && NameInputField.activeSelf)
     {
         Debug.Log("Name Entered: " + NameInputField.GetComponent <InputField>().text);
         HighScoreController.AddHighscoreEntry(PlayerPrefs.GetInt("HighScore", Score.score), NameInputField.GetComponent <InputField>().text);
     }
     SceneManager.LoadScene(gameSceneName); // Loads the game scene again
 }