1er commit
This commit is contained in:
31
include/game/server/Lobby.h
Normal file
31
include/game/server/Lobby.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "misc/Time.h"
|
||||
|
||||
namespace td {
|
||||
namespace server {
|
||||
|
||||
class Server;
|
||||
|
||||
class Lobby{
|
||||
private:
|
||||
Server* m_Server;
|
||||
bool m_GameStarted = false;
|
||||
std::uint64_t m_StartTimerTime = 0;
|
||||
std::vector<std::uint8_t> m_Players;
|
||||
utils::Timer m_Timer;
|
||||
public:
|
||||
Lobby(Server* server);
|
||||
|
||||
void OnPlayerJoin(std::uint8_t playerID);
|
||||
void OnPlayerLeave(std::uint8_t playerID);
|
||||
|
||||
void sendTimeRemaining();
|
||||
|
||||
void tick();
|
||||
};
|
||||
|
||||
} // namespace server
|
||||
} // namespace td
|
||||
Reference in New Issue
Block a user