Struct beehave::Selector
[−]
[src]
pub struct Selector<'a, T> { pub name: &'static str, pub children: Vec<Box<BehaviourNode<T> + 'a>>, }
A composite node which stops evaluating it's children and returns BehaviourResult::Success
when a child returns BehaviourResult::Success
.
Child nodes can also be added to this node.
A BehaviourResult::Success
indicates that one of it's children return BehaviourResult::Failure
when evaluated.
A BehaviourResult::Failure
indicates that none it's children returned BehaviourResult::Success
when evaluated.
Fields
name: &'static str
children: Vec<Box<BehaviourNode<T> + 'a>>
Methods
impl<'a, T: 'a> Selector<'a, T>
[src]
fn new(name: &'static str) -> Selector<T>
fn with_capacity(name: &'static str, capacity: usize) -> Selector<'a, T>
fn with_children(
name: &'static str,
children: Vec<Box<BehaviourNode<T> + 'a>>
) -> Selector<'a, T>
name: &'static str,
children: Vec<Box<BehaviourNode<T> + 'a>>
) -> Selector<'a, T>