From 3694c652ed80703d1e9bcebd683d85460efae4fb Mon Sep 17 00:00:00 2001 From: tenshi Date: Sun, 5 Nov 2023 13:30:14 +0100 Subject: [PATCH 1/2] CLIENT-GAME: Remove useless wave file --- assets/Json/wave.json | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 assets/Json/wave.json diff --git a/assets/Json/wave.json b/assets/Json/wave.json deleted file mode 100644 index 6ad473f3..00000000 --- a/assets/Json/wave.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "wave" : { - "nbrEnemy" : 200, - "positions": [ - { - "position" : { - "x": 11000, - "y": 2000 - } - }, - { - "position" : { - "x": 11000, - "y": 3000 - } - }, - { - "position" : { - "x": 11000, - "y": 8500 - } - }, - { - "position" : { - "x": 11000, - "y": 2800 - } - }, - { - "position" : { - "x": 11000, - "y": 1500 - } - } - ] - } -} From 865836b7188f02345ad4f3fa15a559a093efa681 Mon Sep 17 00:00:00 2001 From: tenshi Date: Sun, 5 Nov 2023 13:51:05 +0100 Subject: [PATCH 2/2] CLIENT-GAME: Add paralax --- src/Client/Systems/Menus/Menu/MenuSystems.cpp | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/Client/Systems/Menus/Menu/MenuSystems.cpp b/src/Client/Systems/Menus/Menu/MenuSystems.cpp index 9a818157..0c60566a 100644 --- a/src/Client/Systems/Menus/Menu/MenuSystems.cpp +++ b/src/Client/Systems/Menus/Menu/MenuSystems.cpp @@ -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( + 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(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()); } @@ -248,7 +255,7 @@ namespace Systems { hoverInputBox, checkTextInput, checkInputDeletion, - initHud, + initSceneGame, quitScene}; } } // namespace Menu