pub fn generate_action_diffs<A: Actionlike>(
global_action_state: Option<Res<'_, ActionState<A>>>,
action_state_query: Query<'_, '_, (Entity, &ActionState<A>)>,
previous_action_state: Local<'_, SummarizedActionState<A>>,
action_diff_events: EventWriter<'_, ActionDiffEvent<A>>,
)
Expand description
Generates an Events
stream of ActionDiff
s from every ActionState
.
This system is not part of the InputManagerPlugin
and must be added manually.
Generally speaking, this should be added as part of PostUpdate
,
to ensure that all inputs have been processed and any manual actions have been sent.