26 m_engine = std::make_unique<eng::Engine>(
67 const auto menuId = menu->getId();
68 const auto configMultiId = configMulti->getId();
69 const auto configSoloId = configSolo->getId();
70 const auto gameSoloId = gameSolo->getId();
71 const auto settingsId = settings->getId();
72 menu->onOptionSelected = [
this, configSoloId, configMultiId, settingsId](
const std::string &option)
78 else if (option ==
"Multi")
82 else if (option ==
"Settings")
87 configMulti->onOptionSelected = [
this, menuId](
const std::string &option)
89 if (option ==
"Create room")
93 else if (option ==
"Join room")
97 else if (option ==
"Go back to menu")
102 configSolo->onOptionSelected = [
this, gameSoloId, menuId](
const std::string &option)
104 if (option ==
"Level easy")
108 else if (option ==
"Level medium")
112 else if (option ==
"Go back to menu")
130 while (m_engine->getState() ==
eng::State::RUN && m_engine->getRenderer()->windowIsOpen())
132 const float delta = m_engine->getClock()->getDeltaSeconds();
134 m_engine->getClock()->restart();
135 m_engine->getSceneManager()->getCurrentScene()->update(delta, m_engine->getRenderer()->getWindowSize());
137 m_engine->render(m_engine->getSceneManager()->getCurrentScene()->getRegistry(),
DARK, delta);