add StateMachine

This commit is contained in:
2025-08-09 11:23:17 +02:00
parent ac3e949323
commit cba790f804
23 changed files with 174 additions and 244 deletions

View File

@@ -11,15 +11,7 @@ void LobbyState::HandlePacket(PlayerID a_Id, const protocol::PacketBase& a_Packe
}
void LobbyState::Update(float a_Delta) {
SetNewState(std::make_shared<GameState>(m_World));
}
void LobbyState::OnPlayerJoin(PlayerID a_Id) {
}
void LobbyState::OnPlayerLeave(PlayerID a_Id) {
m_StateMachine.ChangeState<GameState>(m_World);
}
} // namespace server