1er commit
This commit is contained in:
34
include/game/client/Client.h
Normal file
34
include/game/client/Client.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
|
||||
#include "ClientConnexion.h"
|
||||
#include "ClientGame.h"
|
||||
|
||||
#include "game/Team.h"
|
||||
#include "game/Player.h"
|
||||
|
||||
namespace td {
|
||||
namespace client {
|
||||
|
||||
class Client{
|
||||
private:
|
||||
ClientConnexion m_Connexion;
|
||||
ClientGame m_Game{m_Connexion.GetDispatcher()};
|
||||
bool m_Connected;
|
||||
public:
|
||||
Client(){}
|
||||
|
||||
const ClientGame& getGame() const{ return m_Game; }
|
||||
const ClientConnexion& getConnexion() const{ return m_Connexion; }
|
||||
|
||||
void tick(std::uint64_t delta);
|
||||
|
||||
void connect(const std::string& address, std::uint16_t port);
|
||||
void closeConnection();
|
||||
|
||||
bool isConnected() const{ return m_Connexion.getSocketStatus() == network::Socket::Connected; }
|
||||
|
||||
void selectTeam(game::TeamColor team);
|
||||
};
|
||||
|
||||
} // namespace client
|
||||
} // namespace td
|
||||
Reference in New Issue
Block a user