pub fn gamepad_event_processing_system(
gamepads: Query<'_, '_, (&mut Gamepad, &GamepadSettings)>,
raw_events: EventReader<'_, '_, RawGamepadEvent>,
processed_events: EventWriter<'_, GamepadEvent>,
processed_axis_events: EventWriter<'_, GamepadAxisChangedEvent>,
processed_digital_events: EventWriter<'_, GamepadButtonStateChangedEvent>,
processed_analog_events: EventWriter<'_, GamepadButtonChangedEvent>,
)
Expand description
Consumes RawGamepadEvent
events, filters them using their GamepadSettings
and if successful,
updates the Gamepad
and sends GamepadAxisChangedEvent
, GamepadButtonStateChangedEvent
, GamepadButtonChangedEvent
events.