begin client-server
This commit is contained in:
@@ -9,10 +9,6 @@ namespace server {
|
||||
class Server;
|
||||
|
||||
class IServerState : private utils::SlotGuard {
|
||||
protected:
|
||||
void SendPacket(PlayerID a_Id, const protocol::PacketBase& a_Packet);
|
||||
void SetNewState(const std::shared_ptr<IServerState>& a_NewState);
|
||||
|
||||
public:
|
||||
virtual void HandlePacket(PlayerID a_Id, const protocol::PacketBase& a_Packet) = 0;
|
||||
virtual void Update(float a_Delta) = 0;
|
||||
@@ -22,6 +18,12 @@ class IServerState : private utils::SlotGuard {
|
||||
IServerState();
|
||||
virtual ~IServerState();
|
||||
|
||||
protected:
|
||||
void SendPacket(PlayerID a_Id, const protocol::PacketBase& a_Packet);
|
||||
void BroadcastPacket(const protocol::PacketBase& a_Packet);
|
||||
void SetNewState(const std::shared_ptr<IServerState>& a_NewState);
|
||||
virtual void Init() {}
|
||||
|
||||
private:
|
||||
Server* m_Server;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user