pub fn gamepad_event_system(
    button_input: ResMut<'_, Input<GamepadButton>>,
    axis: ResMut<'_, Axis<GamepadAxis>>,
    button_axis: ResMut<'_, Axis<GamepadButton>>,
    raw_events: EventReader<'_, '_, GamepadEventRaw>,
    events: EventWriter<'_, '_, GamepadEvent>,
    settings: Res<'_, GamepadSettings>
)
Expand description

Modifies the gamepad resources and sends out gamepad events.

The resources Input<GamepadButton>, Axis<GamepadAxis>, and Axis<GamepadButton> are updated and the GamepadEvents are sent according to the received GamepadEventRaws respecting the GamepadSettings.

Differences

The main difference between the events and the resources is that the latter allows you to check specific buttons or axes, rather than reading the events one at a time. This is done through convenient functions like Input::pressed, Input::just_pressed, Input::just_released, and Axis::get.