Exemplo n.º 1
0
 virtual public void FromAnalogueInput(AnalogueInput joystick)
 {
     if (joystick.IsActive())
     {
         FromAngle(joystick.Angle);
     }
     else
     {
         DisableAll();
     }
 }
Exemplo n.º 2
0
        protected override void InitController()
        {
            _inputNames = new List <string>(new[] {
                "UP_DPAD", "DOWN_DPAD", "LEFT_DPAD", "RIGHT_DPAD", "JOY_LEFT", "JOY_RIGHT",
                "A", "B", "X", "Y", "L", "R", "L2", "R2", "CLICK_L", "CLICK_R", "START", "SELECT"
            });

            LeftStick         = new Stick(XAxisLeft, YAxisLeft);
            RightStick        = new Stick(XAxisRight, YAxisRight);
            _actionDPad       = new DpadButton(UpDpad, DownDpad, LeftDpad, RightDpad);
            _keyboardDPad     = new DpadButton(_upDpad, _downDPad, _leftDPad, _rightDPad);
            controllerInitted = true;

            _dpadActionStick = _actionDPad.GetEmulatedJoystick();
            _dpadStick       = _keyboardDPad.GetEmulatedJoystick();

            _globalActionStick = new AnalogueInput();
            _globalStick       = new AnalogueInput();
        }
Exemplo n.º 3
0
 public JoystickEmulator(DirectionalKeys KeysToEmulate)
 {
     directionalKeys = KeysToEmulate;
     _joystick       = new AnalogueInput();
 }