Struct beehave::Conditional
[−]
[src]
pub struct Conditional<F> { pub name: &'static str, // some fields omitted }
A simple action performed on the actor.
This transforms the result into either BehaviourResult::Success
or BehaviourResult::Failure
,
depending on the result of the callback function.
Fields
name: &'static str
Methods
impl<F> Conditional<F>
[src]
fn new(name: &'static str, callback: F) -> Conditional<F>
Trait Implementations
impl<T, F> BehaviourNode<T> for Conditional<F> where
F: FnMut(&mut T) -> bool,
[src]
F: FnMut(&mut T) -> bool,