Exemple #1
0
 /// <summary>
 /// Use it when the level finished.
 /// The player will go to another level.
 /// </summary>
 /// <param name="levelName"></param>
 public void GoToLevel(string levelName)
 {
     CheckPoint.CleanCheckPoint();
     SceneManager.LoadScene(levelName);
 }
Exemple #2
0
 public void ResetGame()
 {
     CheckPoint.CleanCheckPoint();
     LevelSelectionController.Reset();
 }
Exemple #3
0
 /// <summary>
 /// Use it when the restart button is pressed.
 /// The player will be respawned at the start of current level.
 /// </summary>
 public void RestartLevel()
 {
     CheckPoint.CleanCheckPoint();
     SceneManager.LoadScene(SceneManager.GetActiveScene().name);
 }