1
This commit is contained in:
parent
48d7f9f567
commit
3c39bfdda6
@ -61,7 +61,12 @@ namespace mt
|
|||||||
} else {
|
} else {
|
||||||
res_path_ = "../res/";
|
res_path_ = "../res/";
|
||||||
}
|
}
|
||||||
|
RegMetaTables();
|
||||||
|
Load();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MetaMgr::RegMetaTables()
|
||||||
|
{
|
||||||
RegMetaTable<Param>(res_path_);
|
RegMetaTable<Param>(res_path_);
|
||||||
RegMetaTable<Hero>(res_path_);
|
RegMetaTable<Hero>(res_path_);
|
||||||
RegMetaTable<Map>(res_path_);
|
RegMetaTable<Map>(res_path_);
|
||||||
@ -97,6 +102,9 @@ namespace mt
|
|||||||
RegMetaTable<SafeAreaPos>(res_path_);
|
RegMetaTable<SafeAreaPos>(res_path_);
|
||||||
RegMetaTable<Skill>(res_path_);
|
RegMetaTable<Skill>(res_path_);
|
||||||
RegMetaTable<SkillNumber>(res_path_);
|
RegMetaTable<SkillNumber>(res_path_);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MetaMgr::Load()
|
||||||
{
|
{
|
||||||
for (auto& itr : meta_tables) {
|
for (auto& itr : meta_tables) {
|
||||||
itr->static_pre_init_cb();
|
itr->static_pre_init_cb();
|
||||||
@ -113,7 +121,6 @@ namespace mt
|
|||||||
itr->static_post_init_cb();
|
itr->static_post_init_cb();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void MetaMgr::UnInit()
|
void MetaMgr::UnInit()
|
||||||
{
|
{
|
||||||
|
@ -66,6 +66,9 @@ namespace mt
|
|||||||
void Init();
|
void Init();
|
||||||
void UnInit();
|
void UnInit();
|
||||||
|
|
||||||
|
void RegMetaTables();
|
||||||
|
void Load();
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
mt::MetaTable* RegMetaTable(const std::string& dir)
|
mt::MetaTable* RegMetaTable(const std::string& dir)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user