pub trait Node {
// Required method
fn tick(&mut self) -> TickStatus;
// Provided methods
fn reset(&mut self) { ... }
fn abort(&mut self) { ... }
}Expand description
Runtime contract for executable behavior tree nodes.
Implementations should keep all methods non-blocking. If a node blocks inside it can stall tree progress and leave execution stuck until that call returns.
Required Methods§
Sourcefn tick(&mut self) -> TickStatus
fn tick(&mut self) -> TickStatus
Advance the node by one execution step.
Returning TickStatus::Running indicates the node is still in
progress. Returning TickStatus::Success or
TickStatus::Failure indicates the node has reached a terminal
state for the current run.