36 lines
842 B
C++
36 lines
842 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:
|
|
game::WorldPtr m_World;
|
|
sim::ClientSimulation m_Simulation;
|
|
float m_CurrentLerp;
|
|
|
|
public:
|
|
GameState(Client& a_Client, const game::WorldPtr& a_World, std::uint64_t a_StepTime, const std::vector<protocol::LockStep> a_FirstSteps);
|
|
~GameState() {}
|
|
|
|
virtual void Update(float a_Delta) override;
|
|
|
|
float GetCurrentLerp() const {
|
|
return m_CurrentLerp;
|
|
}
|
|
|
|
game::WorldPtr GetWorld() const {
|
|
return m_World;
|
|
}
|
|
|
|
virtual void Handle(const protocol::packets::LockStepsPacket& a_LockStep) override;
|
|
virtual void Handle(const protocol::packets::LockStepResponsePacket& a_LockStep) override;
|
|
};
|
|
|
|
} // namespace client
|
|
} // namespace td
|