Beispiel #1
0
        public override void SetMouseLockMode(MouseLockMode mode)
        {
            var lockMode = UnityEngine.CursorLockMode.None;

            if (mode == MouseLockMode.Confined)
            {
                lockMode = UnityEngine.CursorLockMode.Confined;
            }
            else if (mode == MouseLockMode.Locked)
            {
                lockMode = UnityEngine.CursorLockMode.Locked;
            }

            UnityEngine.Cursor.lockState = lockMode;
        }
Beispiel #2
0
        public override void SetMouseLockMode(MouseLockMode mouseLockMode)
        {
            switch (mouseLockMode)
            {
            case MouseLockMode.None:
                UnityEngine.Cursor.lockState = UnityEngine.CursorLockMode.None;
                break;

            case MouseLockMode.Confined:
                UnityEngine.Cursor.lockState = UnityEngine.CursorLockMode.Confined;
                break;

            case MouseLockMode.Locked:
                UnityEngine.Cursor.lockState = UnityEngine.CursorLockMode.Locked;
                break;
            }
        }
Beispiel #3
0
 public abstract void SetMouseLockMode(MouseLockMode mouseLockMode);