示例#1
0
        IEnumerator<ITask> OnChangeJoystickHandler(OnChangeJoystick onChangeJoystick)
        {
            if (onChangeJoystick.DriveControl == _driveControl)
            {
                // TT Dec-2006 - Copied from V1.0
//                yield return Arbiter.Choice(
//                    _joystickPort.ChangeController(onChangeJoystick.Joystick),
                Activate(Arbiter.Choice(
                    _gameControllerPort.ChangeController(onChangeJoystick.Joystick),
                    delegate(DefaultUpdateResponseType response)
                    {
                        LogInfo("Changed Joystick");
                    },
                    delegate(Fault f)
                    {
                        LogError(null, "Unable to change Joystick", f);
                    })
                );
            }
            // TT Dec-2006 - Copied from V1.0
            yield break;
        }
 IEnumerator<ITask> OnChangeJoystickHandler(OnChangeJoystick onChangeJoystick)
 {
     if (onChangeJoystick.DriveControl == _driveControl)
     {
         Activate(Arbiter.Choice(
             _gameControllerPort.ChangeController(onChangeJoystick.Joystick),
             delegate(DefaultUpdateResponseType response)
             {
                 LogInfo("Changed Joystick");
             },
             delegate(Fault f)
             {
                 LogError(null, "Unable to change Joystick", f);
             })
         );
     }
     yield break;
 }