private void SetInputDevice(InputDevice inpuDevice)
        {
            _inputDevice = inpuDevice;
            if (inpuDevice == InputDevice.Joystick)
            {
#if UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3 || UNITY_5_4 || UNITY_5_5
                Cursor.visible = false;
#else
                Screen.showCursor = false;
#endif
                InputManager.SetInputConfiguration(_joystickConfiguration);
#if UNITY_EDITOR
                Debug.Log("Current Input Device: Joystick");
#endif
            }
            else
            {
#if UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3 || UNITY_5_4 || UNITY_5_5
                Cursor.visible = true;
#else
                Screen.showCursor = true;
#endif
                InputManager.SetInputConfiguration(_keyboardConfiguration);
#if UNITY_EDITOR
                Debug.Log("Current Input Device: KeyboardAndMouse");
#endif
            }
            InputManager.ResetInputAxes();
            RaiseInputDeviceChangedEvent();
        }
Esempio n. 2
0
        private void SetInputDevice(InputDevice inpuDevice)
        {
            _inputDevice = inpuDevice;
            if (inpuDevice == InputDevice.Joystick)
            {
                Cursor.visible = false;
                InputManager.SetInputConfiguration(_joystickConfiguration);
#if UNITY_EDITOR
                //Debug.Log("Current Input Device: Joystick");
#endif
            }
            else
            {
                Cursor.visible = true;
                InputManager.SetInputConfiguration(_keyboardConfiguration);
#if UNITY_EDITOR
                //Debug.Log("Current Input Device: KeyboardAndMouse");
#endif
            }
            InputManager.ResetInputAxes();
            RaiseInputDeviceChangedEvent();
        }
Esempio n. 3
0
 public static void ResetInputAxes()
 {
     InputManager.ResetInputConfiguration(PlayerID.One);
     InputManager.ResetInputAxes();
 }
Esempio n. 4
0
 public static void ResetInputAxes()
 {
     InputManager.ResetInputAxes();
 }