virtual public void FromAnalogueInput(AnalogueInput joystick) { if (joystick.IsActive()) { FromAngle(joystick.Angle); } else { DisableAll(); } }
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(); }
public JoystickEmulator(DirectionalKeys KeysToEmulate) { directionalKeys = KeysToEmulate; _joystick = new AnalogueInput(); }