refactor: create MainMenu and GameMenu classes
This commit is contained in:
@@ -36,7 +36,7 @@ void Lobby::tick() {
|
||||
if (m_GameStarted || m_StartTimerTime == 0)
|
||||
return;
|
||||
|
||||
if (utils::getTime() - m_StartTimerTime >= LOBBY_WAITING_TIME) {
|
||||
if (utils::getTime() - m_StartTimerTime >= LobbyWaitingTime) {
|
||||
protocol::UpdateGameStatePacket packet(game::GameState::Game);
|
||||
m_Server->broadcastPacket(&packet);
|
||||
m_GameStarted = true;
|
||||
@@ -48,7 +48,7 @@ void Lobby::tick() {
|
||||
}
|
||||
|
||||
void Lobby::sendTimeRemaining() {
|
||||
protocol::UpdateLobbyTimePacket packet(LOBBY_WAITING_TIME - (utils::getTime() - m_StartTimerTime)); // converting second to millis
|
||||
protocol::UpdateLobbyTimePacket packet(LobbyWaitingTime - (utils::getTime() - m_StartTimerTime)); // converting second to millis
|
||||
m_Server->broadcastPacket(&packet);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user