/// <summary> /// method called when the pause menu should show or hide /// show or hide the pause menu and set the cursos visible or not is pause or not ( pause so cursor, no pause no cursor) /// </summary> /// <param name="pause">set is must show or hide the pause menu</param> public void PauseGame(bool pause) { // show or hide the cursos is pause is open or close Cursor.visible = pause; // if pause, show pause menu if (pause) { _pauseMenu.Show(); } else { // otherwise, hide pause menu _pauseMenu.Hide(); } }