bonsai icon indicating copy to clipboard operation
bonsai copied to clipboard

Please add some pre-action features:enhancement

Open PudgeKim opened this issue 1 year ago • 0 comments

I hope that this kind of feature is added.

  1. Register some function to the bonsai bt.
fn check_sleep(..) -> (Status, f64) {
    if monster.is_slept() {
        return (Running, 0.0)
    }
    ... // do next action
  1. Select actions to which the function is called.
bt.register(check_sleep, vec![Monster::Attack, Monster::Walk, ...]);
  1. Registered function is called before selected action is called in a behavior tree.

PudgeKim avatar Oct 18 '22 03:10 PudgeKim