public void PauseEvent(bool bl = false) { //MainAnim.Play("On", -1, 0f); PausedObj.SetActive(bl); nonPausedObj.SetActive(!bl); controller.FreezeMovement(bl); controller.enabled = !bl; //drag.enabled = !bl; handSmth.enabled = !bl; swithcer.UsabaleInPlace = !bl; if (!bl) { Cursor.lockState = pauseMode; Cursor.visible = (CursorLockMode.Locked != pauseMode); } else { Cursor.lockState = playeMode; Cursor.visible = (CursorLockMode.Locked != playeMode); } paused = bl; //if (!paused) // LevelSelector (false); }