您的位置:首页 > 其它

关于行为树插件Behavior Designer的学习(一)_Action动作任务

2017-10-20 14:33 1001 查看
关于行为树插件Behavior Designer的学习(一)_Action动作任务<20/10/2017>



动作任务(action task)可以改变游戏对象的状态,例如,运行动画的动作任务或者射击动作任务。

行为树设计师有许多默认的动作任务:

动作任务名称
图标
描述
参数
1,Behavior Tree Reference

引用外部行为树任务:你可以保存行为树为外部行为树,然后使用该任务引用他
2,Idle
永久等待任务:返回一个永远运行的等待状态,需要interrputed任务或者条件终止去打断他
3,Log


日志任务:输出日志,用于调试。text:输出文本

logError:错误文本

4,Perform Interruption
                            
打断任务:立刻终止一个任务,返回成功或者失败,取决与interrput任务的值(他们两个要联用)interruptTasks

The list of tasks to interrupt. Can be any number of tasks.

interruptSuccess

When we interrupt the task should we return a task status of success?

5,Restart Behavior Tree                     
重启任务:重新启动一个新任务,同时返回成功behavior:将要启用的行为树,如果为空启用现在的行为树
6,Send Event
发送事件任务:发送一个事件给行为树,返回成功
targetGameObject:目标对象

eventName:要发送的事件

7,Start Behavior
开始行为树任务:重新启动一个新任务,同时返回成功behavior:将要启用的行为树,如果为空启用现在的行为树
8,Stop Behavior
暂停或者终止行为树任务:暂停或者终止一个行为树
behavior:目标行为树,如果空使用目前的行为树

pauseBehavior:是暂停还是终止

9,Wait
等待任务:等待一段时间,等待结束返回成功
waitTime:等待时间
10,Invoke Method
方法调用任务:调用指定的方法,能够存储返回值
targetGameObject

The GameObject to invoke the method on

componentName

The component to invoke the method on

methodName

The name of the method

parameter1

The first parameter of the method

parameter2

The second parameter of the method

parameter3

The third parameter of the method

parameter4

The fourth parameter of the method

storeResult

Store the result of the invoke call

11,Get Field Value
获取字段值任务:获取指定的字段值
targetGameObject
The GameObject to get the field on

componentName
The component to get the field on

fieldName
The name of the field

fieldValue
The value of the field

12,Get Property Value

获取属性值任务:获取指定的属性targetGameObject

The GameObject to get the property of

componentName

The component to get the property of

propertyName

The name of the property

propertyValue

The value of the property

13,Set Field Value

设置字段值任务:设置指定的字段值
targetGameObject
The GameObject to setthe field on

componentName
The component to set the field on

fieldName
The name of the field

fieldValue
The value to set

14,Set Property Value

设置属性值任务:设置指定的属性值targetGameObject

The GameObject to setthe property of

componentName

The component to set the property of

propertyName

The name of the property

propertyValue
The value to set

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: