载入中...
搜索中...
未找到
eve::rpg::AttributeOpTable类 参考
自定义 op 注册表:opName -> f(currentResult, modifierValue) -> newResult。 更多...
#include <AttributeSystem.h>
Public 类型 | |
| using | Fn = std::function< double(double current, double value)> |
Public 成员函数 | |
| void | registerOp (const std::string &name, Fn fn) |
| void | unregisterOp (const std::string &name) |
| bool | has (const std::string &name) const |
| double | apply (const std::string &name, double current, double value) const |
详细描述
自定义 op 注册表:opName -> f(currentResult, modifierValue) -> newResult。
在文件 AttributeSystem.h 第 22 行定义.
成员类型定义说明
◆ Fn
| using eve::rpg::AttributeOpTable::Fn = std::function<double(double current, double value)> |
在文件 AttributeSystem.h 第 24 行定义.
成员函数说明
◆ apply()
| double eve::rpg::AttributeOpTable::apply | ( | const std::string & | name, |
| double | current, | ||
| double | value | ||
| ) | const |
◆ has()
| bool eve::rpg::AttributeOpTable::has | ( | const std::string & | name | ) | const |
◆ registerOp()
| void eve::rpg::AttributeOpTable::registerOp | ( | const std::string & | name, |
| Fn | fn | ||
| ) |
在文件 AttributeSystem.cpp 第 9 行定义.
◆ unregisterOp()
| void eve::rpg::AttributeOpTable::unregisterOp | ( | const std::string & | name | ) |
在文件 AttributeSystem.cpp 第 11 行定义.
引用了 name.
该类的文档由以下文件生成:
- src/modules/rpg/AttributeSystem.h
- src/modules/rpg/AttributeSystem.cpp