31 lines
643 B
C++
31 lines
643 B
C++
#pragma once
|
|
|
|
#include <client/IClientSocket.h>
|
|
#include <client/IClientState.h>
|
|
#include <chrono>
|
|
|
|
namespace td {
|
|
namespace client {
|
|
|
|
class Client {
|
|
private:
|
|
std::shared_ptr<IClientSocket> m_Socket;
|
|
std::shared_ptr<IClientState> m_State;
|
|
std::chrono::time_point<std::chrono::system_clock> m_LastTime;
|
|
|
|
public:
|
|
Client(const std::shared_ptr<IClientSocket>& a_Socket) : m_Socket(a_Socket), m_LastTime(std::chrono::system_clock::now()) {}
|
|
|
|
void Update();
|
|
|
|
void UpdateState(const std::shared_ptr<IClientState>& a_State);
|
|
|
|
private:
|
|
void Update(float a_Delta);
|
|
|
|
friend class IClientState;
|
|
};
|
|
|
|
} // namespace client
|
|
} // namespace td
|