载入中...
搜索中...
未找到
eve::rpg::SkillRegistry类 参考

#include <Skill.h>

静态 Public 成员函数

static void registerSkill (const SkillDefinition &def)
 
static const SkillDefinitionfind (const std::string &id)
 
static bool remove (const std::string &id)
 
static void clear ()
 
static int count ()
 
static int loadFromJson (const std::string &json, std::string *error=nullptr)
 从 JSON 数组批量注册技能定义,返回成功注册数量。元素形如: { "id": "fireball", "cooldown": 4, "castTime": 1.2, "targetType": "single", "costs": [{"attribute":"mana","amount":20}], "grantedEffects": ["burning"], "tags": ["fire"], "extra": {"projectile": "fireball_vfx"} }
 

详细描述

在文件 Skill.h37 行定义.

成员函数说明

◆ clear()

void eve::rpg::SkillRegistry::clear ( )
static

在文件 Skill.cpp36 行定义.

被这些函数引用 eve::rpg::RPG::clearSkillDefinitions().

◆ count()

int eve::rpg::SkillRegistry::count ( )
static

在文件 Skill.cpp38 行定义.

被这些函数引用 eve::rpg::RPG::getSkillDefinitionCount().

◆ find()

const SkillDefinition * eve::rpg::SkillRegistry::find ( const std::string &  id)
static

◆ loadFromJson()

int eve::rpg::SkillRegistry::loadFromJson ( const std::string &  json,
std::string *  error = nullptr 
)
static

从 JSON 数组批量注册技能定义,返回成功注册数量。元素形如: { "id": "fireball", "cooldown": 4, "castTime": 1.2, "targetType": "single", "costs": [{"attribute":"mana","amount":20}], "grantedEffects": ["burning"], "tags": ["fire"], "extra": {"projectile": "fireball_vfx"} }

在文件 Skill.cpp67 行定义.

引用了 eve::json::Value::at(), error, eve::rpg::SkillDefinition::id, eve::json::Value::isArray(), eve::json::Value::isObject(), n, eve::json::Document::parse(), registerSkill(), eve::json::Document::root(), eve::json::Value::size() , 以及 eve::json::Document::valid().

被这些函数引用 eve::rpg::RPG::registerSkillsFromJson().

◆ registerSkill()

void eve::rpg::SkillRegistry::registerSkill ( const SkillDefinition def)
static

在文件 Skill.cpp23 行定义.

引用了 eve::rpg::SkillDefinition::id.

被这些函数引用 loadFromJson().

◆ remove()

bool eve::rpg::SkillRegistry::remove ( const std::string &  id)
static

在文件 Skill.cpp34 行定义.


该类的文档由以下文件生成: