1
This commit is contained in:
parent
1e6215b4e2
commit
1986c74400
@ -16,6 +16,24 @@ namespace mt
|
||||
return itr != name_hash.end() ? itr->second : nullptr;
|
||||
}
|
||||
|
||||
void MapCollider::StaticPostInit()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void MapCollider::LoadAll()
|
||||
{
|
||||
std::vector<std::string> files = {
|
||||
"main3d_map.colliders.json"
|
||||
};
|
||||
for (auto& filename : files) {
|
||||
MapCollider* p = new MapCollider();
|
||||
p->Load(filename);
|
||||
raw_list.push_back(p);
|
||||
name_hash[filename] = p;
|
||||
}
|
||||
}
|
||||
|
||||
void MapCollider::Load(const std::string& filename)
|
||||
{
|
||||
a8::XObject xobj_root;
|
||||
|
@ -14,6 +14,9 @@ namespace mt
|
||||
public:
|
||||
|
||||
static MapCollider* GetByName(const std::string& name);
|
||||
static void StaticPostInit();
|
||||
|
||||
static void LoadAll();
|
||||
|
||||
public:
|
||||
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "mt/Skill.h"
|
||||
#include "mt/SkillNumber.h"
|
||||
#include "mt/MapArea.h"
|
||||
#include "mt/MapCollider.h"
|
||||
|
||||
#include "app.h"
|
||||
|
||||
@ -106,6 +107,9 @@ namespace mt
|
||||
itr->static_pre_init_cb();
|
||||
itr->load_cb();
|
||||
}
|
||||
{
|
||||
mt::MapCollider::LoadAll();
|
||||
}
|
||||
for (size_t i = 0; i < 3; ++i) {
|
||||
for (auto& itr : meta_tables) {
|
||||
if (i < itr->init_cbs.size()) {
|
||||
@ -116,6 +120,9 @@ namespace mt
|
||||
for (auto& itr : meta_tables) {
|
||||
itr->static_post_init_cb();
|
||||
}
|
||||
{
|
||||
mt::MapCollider::StaticPostInit();
|
||||
}
|
||||
}
|
||||
|
||||
void MetaMgr::UnInit()
|
||||
|
Loading…
x
Reference in New Issue
Block a user