/// <summary> /// Handler for when the user acknowledges there was an error, sends them back to the main menu /// </summary> private void OnErrorConfirmed(ModalStatusCode status, string tag) { GameState.Reset(); MetaState.Reset(); GC.Collect(); SceneManager.LoadScene("MainMenuScene"); }
/// <summary> /// Handler for when the user acknowledges there was an error, sends them back /// </summary> private void OnErrorConfirmed(ModalStatusCode status, string tag, bool result) { if (result) { GameState.Clear(); MetaState.Reset(); GC.Collect(); SceneManager.LoadScene("MainMenuScene"); } else { MetaState.Instance.NextScene = MetaState.Instance.PreviousScene; SceneManager.LoadScene("LoadingScene"); } }
/// <summary> /// Purges the current sessions state /// </summary> public static void Reset() { instance = new MetaState(); }