package
1.1.23
Repository: https://github.com/alkaid/behavior.git
Documentation: pkg.go.dev

# Functions

ConvertAnyValue [T any] 转换 any 类型的值为传入的范型,一般配合map使用 @param v 值 @param ok 值是否有效 @return T @return bool.
No description provided by the author
MapValue [T any] 从 Memory 中获取值 @param m @param key @return T @return bool.
NewBlackboard 实例化一个黑板 @param threadID AI工作线程ID @param parent 父黑板,一般来说是AI集群的共享黑板 @return *Blackboard.
No description provided by the author
No description provided by the author

# Constants

两种情况都中断: AbortModeSelf && AbortModeLowerPriority.
当条件满足时,中断比修饰的节点优先级更低的分支,执行所在分支.
不中止执行.
当条件不满足时,中断修饰的节点所在分支,执行比修饰的节点优先级更低的分支.
组合节点.
组合节点.
组合节点.
行为树默认更新间隔.
态挂载子树时,若正在运行则中断装饰器.
动态挂载子树时,不做任何行为,即不中断正在运行的子树.
动态挂载子树时,若正在运行则重启装饰器.
节点被打断时(瞬时节点无效).
节点启动时.
节点更新时(瞬时节点无效).
全部子节点完成才完成.
只要有一个子节点完成就完成.
节点名称.
节点名称.
节点名称.
正在中断.
活跃.
非活跃.
添加kv.
修改value.
删除kv.
是否相等.
是否大于.
是否大于等于.
是否小于.
是否小于等于.
是否不等.
是否不存在key.
是否设存在KEY.
失败.
进行中.
成功.

# Variables

No description provided by the author
No description provided by the author
No description provided by the author

# Structs

BaseProperties 属性基类.
Blackboard @implement IBlackboard @implement IBlackboardInternal get和set为线程安全,其他方法均为非线程安全,请在树自己的线程内调用 黑板的[生命周期调用,监听添加移除,监听函数的执行]必须派发到AI独立线程 黑板的kv读写可以在任意线程 黑板为树形结构,实例化时可指定父黑板,将继承父黑板的KV.父黑板,一般来说是AI集群的共享黑板。想实现AI间通信时这将很有用.
Composite 复合节点基类 @implement IComposite.
Container 容器基类 @implement IContainer @implement IContainerWorker.
Decorator 装饰器基类 @implement IDecorator.
No description provided by the author
No description provided by the author
Node 节点基类 @implement INode @implement INodeWorker.
NodeMemory 节点数据.
ObservingDecorator 观察者装饰器,实现了对条件的监听,和条件变化时的各种中断模式 节点处于启用状态且条件不再被满足: Stops.NONE: 无 Stops.SELF: 中断当前节点 Stops.LOWER_PRIORITY: 无 Stops.BOTH: 中断当前节点 节点处于停用状态且条件被满足时: Stops.NONE: 无 Stops.SELF: 无 Stops.LOWER_PRIORITY: 关闭当前启用的分支,启动此分支 Stops.BOTH: 关闭当前启用的分支,启动此分支.
ObservingProperties 观察者装饰器属性.
ParallelMemory 并发节点的数据.
No description provided by the author
No description provided by the author

# Interfaces

IBlackboard 黑板,AI行为树实例的记忆.
IBlackboardInternal 框架内或自定义节点时使用的黑板,从 IBlackboard 转化来 含有私有API,业务层请勿调用,避免引发不可预期的后果.
IBrain 大脑=行为树+记忆+委托对象集合.
IBrainInternal 框架内部使用的 Brain.
IComposite 复合节点.
IContainer 容器:可以挂载子节点的节点.
IContainerWorker Container 的回调,Container 的子类必须实现该接口.
IDecorator 装饰器,修饰子节点.
No description provided by the author
INode 节点 继承自 Node 的自定义节点须实现 INodeWorker 一般来说,继承自 Node 的子类不应覆写该接口.
INodeWorker Node 中会回调的方法,应该委托给继承树中的叶子子类实现 继承 Node 须覆写该接口.
IObservingProperties 观察者装饰器属性.
IObservingWorker ObservingDecorator 的回调,ObservingDecorator 的子类必须实现该接口.
No description provided by the author

# Type aliases

AbortMode 中断模式.
No description provided by the author
DynamicBehaviorMode 动态子树中断模式,描述的是装饰器动态挂载子树时若旧子树正在运行应该如何处理.
EventType 行为树回调给委托的事件类型.
FinishMode 平行节点的完成模式.
No description provided by the author
Memory 为 Blackboard 提供内部使用的数据结构.
No description provided by the author
No description provided by the author
Operator 运算符.
No description provided by the author
Result 执行结果.