Function leafwing_input_manager::systems::update_action_state
source · pub fn update_action_state<A: Actionlike>(
gamepad_buttons: Res<'_, ButtonInput<GamepadButton>>,
gamepad_button_axes: Res<'_, Axis<GamepadButton>>,
gamepad_axes: Res<'_, Axis<GamepadAxis>>,
gamepads: Res<'_, Gamepads>,
keycodes: Option<Res<'_, ButtonInput<KeyCode>>>,
mouse_buttons: Option<Res<'_, ButtonInput<MouseButton>>>,
mouse_wheel: EventReader<'_, '_, MouseWheel>,
mouse_motion: EventReader<'_, '_, MouseMotion>,
clash_strategy: Res<'_, ClashStrategy>,
interactions: Query<'_, '_, &Interaction>,
action_state: Option<ResMut<'_, ActionState<A>>>,
input_map: Option<Res<'_, InputMap<A>>>,
query: Query<'_, '_, (&mut ActionState<A>, &InputMap<A>)>
)Expand description
Fetches all of the relevant [ButtonInput] resources to update ActionState according to the InputMap.
Missing resources will be ignored, and treated as if none of the corresponding inputs were pressed.