pub struct AiBehaviorMemory<C>where
C: Component,{
pub entity: Entity,
pub component: &'static mut C,
pub commands: &'static mut UniverseCommands,
}
Fields§
§entity: Entity
§component: &'static mut C
§commands: &'static mut UniverseCommands
Trait Implementations§
Source§impl<MC, TC> Task<AiBehaviorMemory<MC>> for AiBehaviorTask<MC, TC>
impl<MC, TC> Task<AiBehaviorMemory<MC>> for AiBehaviorTask<MC, TC>
Source§fn on_enter(&mut self, memory: &mut AiBehaviorMemory<MC>)
fn on_enter(&mut self, memory: &mut AiBehaviorMemory<MC>)
Action performed when task starts its work.
Source§fn on_exit(&mut self, memory: &mut AiBehaviorMemory<MC>)
fn on_exit(&mut self, memory: &mut AiBehaviorMemory<MC>)
Action performed when task stops its work.
Source§fn is_locked(&self, _memory: &M) -> bool
fn is_locked(&self, _memory: &M) -> bool
Tells if task is locked (it’s still running). Used by decision makers to tell if one can
change its state (when current task is not locked).
Source§fn on_update(&mut self, _memory: &mut M)
fn on_update(&mut self, _memory: &mut M)
Action performed when task is active and gets updated.
Source§fn on_process(&mut self, _memory: &mut M) -> bool
fn on_process(&mut self, _memory: &mut M) -> bool
Action performed when task is active but decision maker did not changed its state.
This one is applicable for making hierarchical decision makers (telling children decision
makers to decide on new state, because some if not all decision makers are tasks). Read more
Auto Trait Implementations§
impl<C> Freeze for AiBehaviorMemory<C>
impl<C> !RefUnwindSafe for AiBehaviorMemory<C>
impl<C> Send for AiBehaviorMemory<C>
impl<C> Sync for AiBehaviorMemory<C>
impl<C> Unpin for AiBehaviorMemory<C>
impl<C> !UnwindSafe for AiBehaviorMemory<C>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more