pub trait EntityTrigger:
'static
+ Send
+ Sync {
type Out: TriggerOut;
// Required methods
fn init(&mut self, world: &mut World);
fn check(&mut self, entity: Entity, world: &World) -> Result<Self::Out>;
}Expand description
Types that implement this may be used in StateMachines to transition from one state to
another. Look at an example for implementing this trait, since it can be tricky.
Required Associated Types§
Sourcetype Out: TriggerOut
type Out: TriggerOut
The trigger’s output. See TriggerOut.