leafwing_input_manager::common_conditions

Function action_toggle_active

source
pub fn action_toggle_active<A>(
    default: bool,
    action: A,
) -> impl FnMut(Res<'_, ActionState<A>>) -> bool
where A: Actionlike + Clone,
Expand description

Stateful run condition that can be toggled via an action press using ActionState::just_pressed.