add StateMachine
This commit is contained in:
@@ -6,9 +6,7 @@
|
||||
namespace td {
|
||||
namespace server {
|
||||
|
||||
GameState::GameState(const std::shared_ptr<game::World>& a_World) : m_World(a_World), m_Simulation(*m_World, STEP_TIME), m_Time(0) {}
|
||||
|
||||
void GameState::Init() {
|
||||
GameState::GameState(Server& a_Server, const std::shared_ptr<game::World>& a_World) : ServerState(a_Server), m_World(a_World), m_Simulation(*m_World, STEP_TIME), m_Time(0) {
|
||||
std::cout << "Switched to Game state !\n";
|
||||
BroadcastPacket(m_Simulation.MakePacket());
|
||||
}
|
||||
@@ -28,9 +26,5 @@ void GameState::Update(float a_Delta) {
|
||||
}
|
||||
}
|
||||
|
||||
void GameState::OnPlayerJoin(PlayerID a_Id) {}
|
||||
|
||||
void GameState::OnPlayerLeave(PlayerID a_Id) {}
|
||||
|
||||
} // namespace server
|
||||
} // namespace td
|
||||
|
||||
Reference in New Issue
Block a user