public void BackToMenu() { SceneManager.LoadScene("MainMenu"); CursorManager.ChangeCursorToMenu(); loadingManager.LoadJustAnimation(); mainCanva.SetActive(false); }
// Update is called once per frame void Update() { if (Input.GetButtonDown("Menu")) { if (!mainCanva.activeSelf) { CursorManager.ChangeCursorToMenu(); Time.timeScale = 0f; mainCanva.SetActive(true); StartCoroutine("CanClose"); } if (mainCanva.activeSelf && !justOpenSettings) { ResumeGame(); } } }