关于行为树插件Behavior Designer的学习(二)_Composites复合任务<20/10/2017>
Composites复合任务是一组子任务的父任务。例如,一个条件任务和一个动作任务,可以被一个复合任务组合起来,复合任务是父任务,前面两个任务是子任务。复合任务的返回值取决于他的子任务。
行为树设计师插件有以下默认的复合任务,每个复合任务都有条件终止的选项(参考前面章节--条件终止)。
列表
名称 | 图标 | 描述 | 参数 |
1,Sequence |
| 顺序执行任务:类似“and”操作,其中一个子任务返回失败,它就返回失败,全部返回成功它就返回成功 | |
2,Selector . | 选择执行任务:类似“or”操作,其中一个子任务返回成功,它就返回成功,全部失败它就返回失败 | ||
3,Parallel | 并发执行任务:类似顺序执行任务,不同的是它是一起执行而不是一个一个执行,其中一个子任务返回失败,它就返回失败,全部返回成功它就返回成功 | ||
4,Parallel Selector | 并发选择执行任务:类似选择执行任务,不同的是它是一起执行而不是一个一个执行,其中一个子任务返回成功,它就返回成功,全部失败它就返回失败 | ||
5,Priority Selector | 优先选择执行任务:类似选择执行任务,不同的是他不是从左到右执行任务,而是优先执行高级别任务,其中一个子任务返回成功,它就返回成功,全部失败它就返回失败 | 级别高低在条件终止中设置 | |
6,Random Selector | 随机选择执行任务:类似选择执行任务,不同的是他是随机选择子任务运行,其中一个子任务返回成功,它就返回成功,全部失败它就返回失败 | seed useSeed | |
7,Random Sequence | 随机顺序执行任务:类似顺序执行任务,不同的是他是随机选择子任务运行,其中一个子任务返回失败,它就返回失败,全部返回成功它就返回成功 | seed useSeed | |
8,Selector Evaluator | 选择计算任务:它每周期对子任务进行重新判断,他会运行最低级别的任务,并返回任务状态,如果一个高级别子任务正在运行,而低级别任务想要运行的时候,它会打断高级别任务,转而运行低级别任务。它会在最低级别子任务返回成功时返回成功,如果不成功,就会尝试运行高级别任务。它是不需要条件任务的一种条件终止模式的模拟。 |