赞
踩
在最高级别,行为树是任务的集合。任务类具有以下API:
- // OnAwake is called once when the behavior tree is enabled. Think of it as a constructor.
- void OnAwake();
-
- // OnStart is called immediately before execution. It is used to setup any variables that need to be reset from the previous run.
- void OnStart();
-
- // OnUpdate runs the actual task.
- TaskStatus OnUpdate();
-
- // OnFixedUpdate executes during the FixedUpdate loop. The TaskStatus must be returned within OnUpdate.
- void OnFixedUpdate();
-
- // OnEnd is called after execution on a success or failure.
- void OnEnd();
-
- // OnPause is called when the behavior is paused or resumed.
- void OnPause(bool paused);
-
- // Ret
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。