void ResetSaveData(int windowID) { GuiDisplayScript.ConfirmModal("Are you sure you want to reset your save data?", () => { PlayerPrefs.DeleteAll(); ShowConfirmWindow = false; }, () => ShowConfirmWindow = false); }
void RestartLevel(int windowID) { GuiDisplayScript.ConfirmModal("Are you sure you want to restart the level?", () => { confirmModal = null; Time.timeScale = Time.timeScale == 0 ? 1 : 0; Application.LoadLevel("Level" + FindObjectsOfType <PlayerScript>()[0].LevelNumber); }, () => { confirmModal = null; Time.timeScale = Time.timeScale == 0 ? 1 : 0; }); }
void QuitLevel(int windowID) { GuiDisplayScript.ConfirmModal("Are you sure you want to quit the level?", () => { confirmModal = null; Time.timeScale = Time.timeScale == 0 ? 1 : 0; Application.LoadLevel("Map"); }, () => { confirmModal = null; Time.timeScale = Time.timeScale == 0 ? 1 : 0; }); }