コード例 #1
0
        public static void Enable()
        {
            var errors = new List <string>();

            if (WiiUDeviceManager.CheckPlatformSupport(errors))
            {
                //InputManager.HideDevicesWithProfile( typeof( Xbox360WinProfile ) );
                //InputManager.HideDevicesWithProfile( typeof( XboxOneWinProfile ) );
                //InputManager.HideDevicesWithProfile( typeof( LogitechF710ModeXWinProfile ) );
                //InputManager.HideDevicesWithProfile( typeof( LogitechF310ModeXWinProfile ) );
                //InputManager.AddDeviceManager( new XInputDeviceManager() );
                InputManager.AddDeviceManager(new WiiUDeviceManager());
            }
            else
            {
                foreach (var error in errors)
                {
                    Logger.LogError(error);
                }
            }
        }
コード例 #2
0
        public static void Setup()
        {
            if (isSetup)
            {
                return;
            }

            Platform = (SystemInfo.operatingSystem + " " + SystemInfo.deviceModel).ToUpper();

            initialTime    = 0.0f;
            currentTime    = 0.0f;
            lastUpdateTime = 0.0f;
            currentTick    = 0;

            inputDeviceManagers.Clear();
            devices.Clear();
            Devices      = new ReadOnlyCollection <InputDevice>(devices);
            activeDevice = InputDevice.Null;

            isSetup = true;

                        #if UNITY_STANDALONE_WIN || UNITY_EDITOR
            if (enableXInput)
            {
                XInputDeviceManager.Enable();
            }
                        #endif
#if UNITY_WIIU
            WiiUDeviceManager.Enable();
#endif

            AddDeviceManager(new UnityInputDeviceManager());

            if (OnSetup != null)
            {
                OnSetup.Invoke();
                OnSetup = null;
            }
        }