当前位置:   article > 正文

探讨行为树的任务

探讨行为树的任务

任务

在最高级别,行为树是任务的集合。任务类具有以下API:

  1. // OnAwake is called once when the behavior tree is enabled. Think of it as a constructor.
  2. void OnAwake();
  3. // OnStart is called immediately before execution. It is used to setup any variables that need to be reset from the previous run.
  4. void OnStart();
  5. // OnUpdate runs the actual task.
  6. TaskStatus OnUpdate();
  7. // OnFixedUpdate executes during the FixedUpdate loop. The TaskStatus must be returned within OnUpdate.
  8. void OnFixedUpdate();
  9. // OnEnd is called after execution on a success or failure.
  10. void OnEnd();
  11. // OnPause is called when the behavior is paused or resumed.
  12. void OnPause(bool paused);
  13. // Ret
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/295044?site
推荐阅读
相关标签
  

闽ICP备14008679号