/// <summary> /// Delete the current save data and reload the game. /// </summary> public void DeleteSaveData() { SaveLoad.Delete(); Destroy(GameManager.Instance.gameObject); sceneTransition.LoadScene("MainMenu"); }
/// <summary> /// Save the player's data and then start the FadeOutToScene coroutine. /// </summary> /// <param name="sceneName">The name of the scene to load.</param> public void SaveAndLoadScene(string sceneName) { SaveLoad.Save(); StartCoroutine(FadeOutToScene(sceneName)); }