Esempio n. 1
0
        public override bool InitAllControllers()
        {
            // It only works in windows.
            if (Application.platform != RuntimePlatform.WindowsEditor &&
                Application.platform != RuntimePlatform.WindowsPlayer
                )
            {
                return(false);
            }
            //
            impl = new XInputPlugin.Impl(pluginVersion);
            //
            bool ret = base.InitAllControllers();

            if (ret)
            {
                if (!IsConnected(0))
                {
                    return(false);
                }
                controllers = new XboxController[1] {
                    new XboxController(this, "XboxController", 0)
                };
            }
            return(ret);
        }
Esempio n. 2
0
 public override bool DeinitAllControllers()
 {
     if (impl != null)
     {
         impl.Dispose();
         impl = null;
     }
     return(base.DeinitAllControllers());
 }