Trait iyes_loopless::condition::ConditionHelpers
source · [−]pub trait ConditionHelpers: Sized {
Show 13 methods
fn run_if<Condition, Params>(self, condition: Condition) -> Self
where
Condition: IntoSystem<(), bool, Params>;
fn run_if_not<Condition, Params>(self, condition: Condition) -> Self
where
Condition: IntoSystem<(), bool, Params>,
{ ... }
fn run_on_event<T: Send + Sync + 'static>(self) -> Self { ... }
fn run_if_resource_exists<T: Resource>(self) -> Self { ... }
fn run_unless_resource_exists<T: Resource>(self) -> Self { ... }
fn run_if_resource_added<T: Resource>(self) -> Self { ... }
fn run_if_resource_removed<T: Resource>(self) -> Self { ... }
fn run_if_resource_equals<T: Resource + PartialEq>(self, value: T) -> Self { ... }
fn run_unless_resource_equals<T: Resource + PartialEq>(
self,
value: T
) -> Self { ... }
fn run_in_state<T: StateData>(self, state: T) -> Self { ... }
fn run_not_in_state<T: StateData>(self, state: T) -> Self { ... }
fn run_in_bevy_state<T: StateData>(self, state: T) -> Self { ... }
fn run_not_in_bevy_state<T: StateData>(self, state: T) -> Self { ... }
}Required Methods
fn run_if<Condition, Params>(self, condition: Condition) -> Self where
Condition: IntoSystem<(), bool, Params>,
Provided Methods
fn run_if_not<Condition, Params>(self, condition: Condition) -> Self where
Condition: IntoSystem<(), bool, Params>,
fn run_if_not<Condition, Params>(self, condition: Condition) -> Self where
Condition: IntoSystem<(), bool, Params>,
Helper: add a condition, but flip its result
fn run_on_event<T: Send + Sync + 'static>(self) -> Self
fn run_on_event<T: Send + Sync + 'static>(self) -> Self
Helper: add a condition to run if there are events of the given type
fn run_if_resource_exists<T: Resource>(self) -> Self
fn run_if_resource_exists<T: Resource>(self) -> Self
Helper: add a condition to run if a resource of a given type exists
fn run_unless_resource_exists<T: Resource>(self) -> Self
fn run_unless_resource_exists<T: Resource>(self) -> Self
Helper: add a condition to run if a resource of a given type does not exist
fn run_if_resource_added<T: Resource>(self) -> Self
fn run_if_resource_added<T: Resource>(self) -> Self
Helper: add a condition to run if a resource was added
fn run_if_resource_removed<T: Resource>(self) -> Self
fn run_if_resource_removed<T: Resource>(self) -> Self
Helper: add a condition to run if a resource was removed
fn run_if_resource_equals<T: Resource + PartialEq>(self, value: T) -> Self
fn run_if_resource_equals<T: Resource + PartialEq>(self, value: T) -> Self
Helper: add a condition to run if a resource equals the given value
fn run_unless_resource_equals<T: Resource + PartialEq>(self, value: T) -> Self
fn run_unless_resource_equals<T: Resource + PartialEq>(self, value: T) -> Self
Helper: add a condition to run if a resource does not equal the given value
fn run_in_state<T: StateData>(self, state: T) -> Self
fn run_in_state<T: StateData>(self, state: T) -> Self
Helper: run in a specific state (checks the CurrentState resource)
fn run_not_in_state<T: StateData>(self, state: T) -> Self
fn run_not_in_state<T: StateData>(self, state: T) -> Self
Helper: run when not in a specific state (checks the CurrentState resource)
fn run_in_bevy_state<T: StateData>(self, state: T) -> Self
fn run_in_bevy_state<T: StateData>(self, state: T) -> Self
Helper: run in a specific Bevy state (checks the State<T> resource)
fn run_not_in_bevy_state<T: StateData>(self, state: T) -> Self
fn run_not_in_bevy_state<T: StateData>(self, state: T) -> Self
Helper: run when not in a specific Bevy state (checks the State<T> resource)