bonsai
bonsai copied to clipboard
Please add some pre-action features:enhancement
I hope that this kind of feature is added.
- Register some function to the bonsai bt.
fn check_sleep(..) -> (Status, f64) {
if monster.is_slept() {
return (Running, 0.0)
}
... // do next action
- Select actions to which the function is called.
bt.register(check_sleep, vec![Monster::Attack, Monster::Walk, ...]);
- Registered function is called before selected action is called in a behavior tree.