pub enum BehaviorNode {
Action(String),
Condition(String),
Sequence(Vec<BehaviorNode>),
Selector(Vec<BehaviorNode>),
Decorator(DecoratorType, Box<BehaviorNode>),
Parallel(usize, Vec<BehaviorNode>),
}Expand description
A single node in the behavior tree.
Variants§
Action(String)
Leaf that executes a named action. Result is looked up in the context.
Condition(String)
Leaf that checks a named boolean condition in the context.
Sequence(Vec<BehaviorNode>)
Runs children left-to-right; stops on first non-Success.
Selector(Vec<BehaviorNode>)
Runs children left-to-right; stops on first Success.
Decorator(DecoratorType, Box<BehaviorNode>)
Applies a DecoratorType to a single child.
Parallel(usize, Vec<BehaviorNode>)
Runs all children concurrently; succeeds when threshold children succeed.
Trait Implementations§
Source§impl Clone for BehaviorNode
impl Clone for BehaviorNode
Source§fn clone(&self) -> BehaviorNode
fn clone(&self) -> BehaviorNode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BehaviorNode
impl Debug for BehaviorNode
Source§impl<'de> Deserialize<'de> for BehaviorNode
impl<'de> Deserialize<'de> for BehaviorNode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BehaviorNode
impl RefUnwindSafe for BehaviorNode
impl Send for BehaviorNode
impl Sync for BehaviorNode
impl Unpin for BehaviorNode
impl UnsafeUnpin for BehaviorNode
impl UnwindSafe for BehaviorNode
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