Skip to content

Commit

Permalink
CLIENT-GAME: Add paralax
Browse files Browse the repository at this point in the history
  • Loading branch information
TTENSHII committed Nov 5, 2023
1 parent 4b586f4 commit 865836b
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions src/Client/Systems/Menus/Menu/MenuSystems.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,17 +222,24 @@ namespace Systems {
}
}

// this system is not in the good file for the moment
void initHud(std::size_t managerId, std::size_t systemId)
// this two systems are not in the good file for the moment
static void initHud()
{
nlohmann::json jsonData = Json::getInstance().getDataByJsonType<nlohmann::json>(
ResourcesManager::getPathByJsonType(JsonType::HUD),
"gameHud");
::Menu::MenuBuilder::getInstance().initMenuSceneEntity(
Json::getInstance().getDatasFromList(jsonData));
}

void initSceneGame(std::size_t managerId, std::size_t systemId)
{
if (Scene::SceneManager::getInstance().getCurrentScene() != GAME) {
return;
}
try {
nlohmann::json jsonData =
Json::getInstance().getDataByJsonType<nlohmann::json>(ResourcesManager::getPathByJsonType(JsonType::HUD), "gameHud");
::Menu::MenuBuilder::getInstance().initMenuSceneEntity(
Json::getInstance().getDatasFromList(jsonData));
Parallax::initParalax();
initHud();
} catch (std::runtime_error &err) {
Logger::info(err.what());
}
Expand All @@ -248,7 +255,7 @@ namespace Systems {
hoverInputBox,
checkTextInput,
checkInputDeletion,
initHud,
initSceneGame,
quitScene};
}
} // namespace Menu
Expand Down

0 comments on commit 865836b

Please sign in to comment.