关于行为树插件Behavior Designer的学习(四)_Decorators装饰任务

来源:互联网 发布:ncut算法代码 编辑:程序博客网 时间:2024/05/17 19:58

关于行为树插件Behavior Designer的学习(四)_Decorators装饰任务<20/10/2017>

 

    Decorators 装饰任务是用于包裹其他任务的任务,他只能有一个子任务。装饰任务可以改变子任务的行为,例如,装饰任务可以保持子任务持续运行或者改变子任务的返回值。

     行为树设计师插件包含以下默认的装饰任务:

名称图标描述参数

1,Conditional Evaluator                .                                            

条件计算器:用于评估指定的条件任务,如果被评估的条件任务返回成功,则运行条件计算器的子任务,否则不运行。条件任务的评估只在开始评估一次。

reevaluate
Should the conditional task be reevaluated every tick?

conditionalTask
The conditional task to evaluate

2,Interrupt中断器:它将中断它所有的子任务。这个中断任务需要使用interruption去触发它,interruption触发前它将保持子任务的运行。如果没有interruption发生,它将返回子任务执行的结果值
3,Inverter逆变器:返回与子任务相反的值,意思就是子任务返回成功就反转成失败

4,Repeater重复执行器:按照指定的次数重复执行子任务,即使子任务返回失败也同样重复执行

count
The number of times to repeat the execution of its child task.

repeatForever
Allows the repeater to repeat forever.

endOnFailure
Should the task return if the child task returns a failure.

5,Return
Failure返回失败器:子任务未运行时保持返回失败
6,Return
Success
返回成功器:子任务未运行时保持返回成功
7,Task Guard任务警卫器:类似多任务程序里面的信号灯。他的作用是防止有限的资源被过度使用。例如,有两个任务都要播放同一个骨骼的动画,如果设置了警卫数字1,那么两个任务中的一个在运行动画的时候,另外一个只能排队或者跳过动画。

maxTaskAccessCount
The number of times the child tasks can be accessed by parallel tasks at once. Marked as SynchronizeField to synchronize the value between any linked tasks.

linkedTaskGuards
The linked tasks that also guard a task. If the task guard is not linked against any other tasks it doesn't have much purpose. Marked as LinkedTask to ensure all tasks linked are linked to the same set of tasks.

waitUntilTaskAvailable
If true the task will wait until the child task is available. If false then any unavailable child tasks will be skipped over.

8,Until
Failure
直到失败:一直运行子任务直到返回失败
9,Until
Success                                                                                                                     直到成功:一直运行子任务直到返回成功
阅读全文
0 0
原创粉丝点击