public void btn_main_menu_Click() { Time.timeScale = 1.0f; DontDestroy.DestroyAll(); SceneManager.LoadScene("title", LoadSceneMode.Single); }
private void Reset() { if (File.Exists(Application.persistentDataPath + "/game.fun")) { File.Delete(Application.persistentDataPath + "/game.fun"); } DontDestroy.DestroyAll(); SceneManager.LoadScene(0); }
private void Update() { if (Input.GetKey(KeyCode.LeftControl) && Input.GetKey(KeyCode.LeftShift) && Input.GetKeyDown(KeyCode.R)) { Reset(); return; } if (Input.GetKey(KeyCode.LeftControl) && Input.GetKeyDown(KeyCode.R)) { DontDestroy.DestroyAll(); SceneManager.LoadScene(0); return; } if (Input.GetKey(KeyCode.LeftControl) && Input.GetKey(KeyCode.LeftShift) && Input.GetKeyDown(KeyCode.S)) { Save(); return; } }