Trait bevy_sequential_actions::Action
source · pub trait Action: Send + Sync + 'static {
fn on_start(
&mut self,
agent: Entity,
world: &mut World,
commands: &mut ActionCommands
);
fn on_stop(&mut self, agent: Entity, world: &mut World, reason: StopReason);
}Expand description
The trait that all actions must implement.
Required Methods
sourcefn on_start(
&mut self,
agent: Entity,
world: &mut World,
commands: &mut ActionCommands
)
fn on_start(
&mut self,
agent: Entity,
world: &mut World,
commands: &mut ActionCommands
)
The method that is called when an action is started.
sourcefn on_stop(&mut self, agent: Entity, world: &mut World, reason: StopReason)
fn on_stop(&mut self, agent: Entity, world: &mut World, reason: StopReason)
The method that is called when an action is stopped.