Function bevy::ecs::prelude::in_state

pub fn in_state<S>(state: S) -> impl FnMut(Res<'_, State<S>>)where
    S: States,
Expand description

Generates a Condition-satisfying closure that returns true if the state machine is currently in state.

Panics

The condition will panic if the resource does not exist.