37 lines
774 B
C++
37 lines
774 B
C++
#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 render();
|
|
|
|
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
|