ngl_server 1.0
基于 Actor 模型的 C++ 服务器框架
ngl::nbt_condition_node< TACTOR > Class Template Referencefinal

条件节点包装类。 More...

#include <nbt.h>

Inheritance diagram for ngl::nbt_condition_node< TACTOR >:

Public Member Functions

 nbt_condition_node (const std::string &aname, const BT::NodeConfig &aconfig, nbt_node_callback< TACTOR > afun)
 构造函数。
nbt_status tick () override
 执行条件评估。

Detailed Description

template<typename TACTOR>
class ngl::nbt_condition_node< TACTOR >

条件节点包装类。

继承自BT::ConditionNode,用于评估条件表达式。 条件节点应只返回SUCCESS或FAILURE,不应返回RUNNING。

Template Parameters
TACTORActor类型
Note
常用于行为树中的守卫条件判断。

Constructor & Destructor Documentation

◆ nbt_condition_node()

template<typename TACTOR>
ngl::nbt_condition_node< TACTOR >::nbt_condition_node ( const std::string & aname,
const BT::NodeConfig & aconfig,
nbt_node_callback< TACTOR > afun )
inline

构造函数。

Parameters
aname节点实例名称
aconfig节点配置
afun用户注册的条件回调函数

Member Function Documentation

◆ tick()

template<typename TACTOR>
nbt_status ngl::nbt_condition_node< TACTOR >::tick ( )
inlineoverride

执行条件评估。

Returns
条件评估结果(SUCCESS或FAILURE)

The documentation for this class was generated from the following file: