32 lines
761 B
C++
32 lines
761 B
C++
#pragma once
|
|
|
|
#include <client/ClientState.h>
|
|
#include <td/game/World.h>
|
|
#include <td/simulation/ClientSimulation.h>
|
|
|
|
namespace td {
|
|
namespace client {
|
|
|
|
class GameState : public ClientState {
|
|
private:
|
|
std::shared_ptr<game::World> m_World;
|
|
sim::ClientSimulation m_Simulation;
|
|
float m_CurrentLerp;
|
|
|
|
public:
|
|
GameState(Client& a_Client, const std::shared_ptr<game::World>& a_World, std::uint64_t a_StepTime);
|
|
~GameState() {}
|
|
|
|
virtual void Update(float a_Delta) override;
|
|
|
|
float GetCurrentLerp() const {
|
|
return m_CurrentLerp;
|
|
}
|
|
|
|
virtual void Handle(const protocol::packets::LockStepsPacket& a_LockStep) override;
|
|
virtual void Handle(const protocol::packets::LockStepResponsePacket& a_LockStep) override;
|
|
};
|
|
|
|
} // namespace client
|
|
} // namespace td
|