added load npcs from json
This commit is contained in:
1 parent
b3fda88784
commit
943b6b4d21
6 files changed
+208
-4
No files matched your search
@@ -169,6 +169,13 @@ namespace ZL
|
||||
Eigen::Quaternionf(Eigen::AngleAxisf(M_PI, Eigen::Vector3f::UnitZ()));
|
||||
|
||||
std::cout << "Load resurces step 9" << std::endl;
|
||||
|
||||
// Load NPCs from JSON
|
||||
npcs = GameObjectLoader::loadAndCreateNpcs("resources/config2/npcs.json", CONST_ZIP_FILE);
|
||||
|
||||
/*
|
||||
// === СТАРЫЙ КОД - ЗАКОММЕНТИРОВАНО, НПС ТЕПЕРЬ ГРУЗЯТСЯ ИЗ JSON ===
|
||||
|
||||
auto defaultTexture = std::make_shared<Texture>(CreateTextureDataFromPng("resources/w/default_skin001.png", CONST_ZIP_FILE));
|
||||
|
||||
auto npc01 = std::make_unique<Character>();
|
||||
@@ -207,6 +214,9 @@ namespace ZL
|
||||
npcs.push_back(std::move(npc02));
|
||||
|
||||
std::cout << "Load resurces step 12" << std::endl;
|
||||
|
||||
// === КОНЕЦ СТАРОГО КОДА ===
|
||||
*/
|
||||
|
||||
loadingCompleted = true;
|
||||
|
||||
|
||||
Reference in new issue
Block a user