|
ngl_server 1.0
基于 Actor 模型的 C++ 服务器框架
|
装饰器节点包装类(单个子节点)。 More...
#include <nbt.h>
Public Member Functions | |
| nbt_decorator_node (const std::string &aname, const BT::NodeConfig &aconfig, nbt_decorator_callback< TACTOR > afun) | |
| 构造函数。 | |
| nbt_status | tick () override |
| 执行装饰器tick。 | |
装饰器节点包装类(单个子节点)。
继承自BT::DecoratorNode,先tick子节点,然后将子节点结果传递给回调。 回调决定最终状态,可实现反转、重复、超时等逻辑。
| TACTOR | Actor类型 |
|
inline |
构造函数。
| aname | 节点实例名称 |
| aconfig | 节点配置 |
| afun | 装饰器回调函数 |
|
inlineoverride |
执行装饰器tick。
先tick子节点获取结果,再调用回调函数决定最终状态。