pub fn in_state<S>(state: S) -> impl FnMut(Res<'_, State<S>>)where S: States,
Generates a Condition-satisfying closure that returns true if the state machine is currently in state.
Condition
true
state
The condition will panic if the resource does not exist.