private void InternalLockUpdate() { if (m_PlayerInputManager.EscapeButtonDown()) { m_CursorIsLocked = false; } else if (m_PlayerInputManager.LeftMouseDown()) { m_CursorIsLocked = true; } switch (m_CursorIsLocked) { case true: Cursor.lockState = CursorLockMode.Locked; Cursor.visible = false; break; case false: Cursor.lockState = CursorLockMode.None; Cursor.visible = true; break; } }