public void SelectLevel(int number) { if (PlayerPrefs.GetInt("levelNumber") == 0) { PlayerPrefs.SetInt("levelNumber", 1); } if (PlayerPrefs.GetInt("levelNumber") >= number) { fading.FadeTo("Level" + number); } }
public void PlayGame() { //SceneManager.LoadScene (startLevelName); fading.FadeTo(startLevelName); }
public void ResetGame() { //SceneManager.LoadScene (); Time.timeScale = 1f; fading.FadeTo(SceneManager.GetActiveScene().name); }