void O_M_C_Input_GamePadListener.onAxisChanged(GamePad gamePad, int axisCode, float axisValue) { switch ((MonoGameGamePad.AxisCodes)axisCode) { case MonoGameGamePad.AxisCodes.LeftThumbstickX: notifyLeftStickXMoved(axisValue); break; case MonoGameGamePad.AxisCodes.LeftThumbstickY: notifyLeftStickYMoved(axisValue); break; case MonoGameGamePad.AxisCodes.RightThumbstickX: notifyRightStickXMoved(axisValue); break; case MonoGameGamePad.AxisCodes.RightThumbstickY: notifyRightStickYMoved(axisValue); break; case MonoGameGamePad.AxisCodes.LeftTrigger: notifyL2Moved(axisValue); break; case MonoGameGamePad.AxisCodes.RightTrigger: notifyR2Moved(axisValue); break; } }
void O_M_C_Input_GamePadListener.onButtonDown(GamePad gamePad, int buttonCode) { var button = buttonCodeToPS4Button(buttonCode); if (button != null) { notifyButtonDown(button); } }
void O_M_C_Input_GamePadListener.onPovChanged(GamePad gamePad, int povCode, PovState povState) { if (povState.isPressed(PovState.NORTH_) != _prevPovState.isPressed(PovState.NORTH_)) { if (povState.isPressed(PovState.NORTH_)) { notifyButtonDown(PS4Button.UP_); } else { notifyButtonUp(PS4Button.UP_); } } if (povState.isPressed(PovState.SOUTH_) != _prevPovState.isPressed(PovState.SOUTH_)) { if (povState.isPressed(PovState.SOUTH_)) { notifyButtonDown(PS4Button.DOWN_); } else { notifyButtonUp(PS4Button.DOWN_); } } if (povState.isPressed(PovState.EAST_) != _prevPovState.isPressed(PovState.EAST_)) { if (povState.isPressed(PovState.EAST_)) { notifyButtonDown(PS4Button.RIGHT_); } else { notifyButtonUp(PS4Button.RIGHT_); } } if (povState.isPressed(PovState.WEST_) != _prevPovState.isPressed(PovState.WEST_)) { if (povState.isPressed(PovState.WEST_)) { notifyButtonDown(PS4Button.LEFT_); } else { notifyButtonUp(PS4Button.LEFT_); } } _prevPovState = povState; }
void O_M_C_Input_GamePadListener.onDisconnect(GamePad gamePad) { notifyDisconnected(); }
public MonoGamePS4GamePad(GamePad gamePad) : base() { base._init_(gamePad); _prevPovState = gamePad.getPov(0); }
public MonoGamePS4GamePad(GamePad gamePad, DeadZone leftStickDeadZone, DeadZone rightStickDeadZone) : base() { base._init_(gamePad, leftStickDeadZone, rightStickDeadZone); _prevPovState = gamePad.getPov(0); }
void O_M_C_Input_GamePadListener.onAccelerometerChanged(GamePad gamePad, int accelerometerCode, Vector3 value) { }
public MonoGamePS4GamePad(GamePad gamePad) : base() { base._init_(gamePad); }
public MonoGamePS4GamePad(GamePad gamePad, DeadZone leftStickDeadZone, DeadZone rightStickDeadZone) : base() { base._init_(gamePad, leftStickDeadZone, rightStickDeadZone); }
public SwitchJoyConLGamePad newSwitchJoyConLGamePad(GamePad gamePad) { throw new NotImplementedException(); }
public PS4GamePad newPS4GamePad(GamePad gamePad) { return(new MonoGamePS4GamePad(gamePad)); }
public XboxGamePad newXboxGamePad(GamePad gamePad) { return(new MonoGameXboxGamePad(gamePad)); }