add some minor comments
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
|
||||
namespace td {
|
||||
|
||||
// TODO: get rid of this class
|
||||
class WorldApply : public protocol::PacketHandler {
|
||||
private:
|
||||
game::World& m_World;
|
||||
@@ -84,25 +85,26 @@ game::WorldPtr GetWorld() {
|
||||
}
|
||||
|
||||
DebugWorldState::DebugWorldState(Display& a_Display) : DisplayState(a_Display) {
|
||||
game::WorldPtr serverWorld = GetWorld();
|
||||
|
||||
// server
|
||||
game::WorldPtr serverWorld = GetWorld();
|
||||
auto serverFakeSocket = std::make_shared<server::FakeSocket>();
|
||||
m_Server = std::make_unique<server::Server>(serverFakeSocket);
|
||||
|
||||
// client
|
||||
game::WorldPtr clientWorld = GetWorld();
|
||||
auto clientFakeSocket = client::FakeSocket::Connect(serverFakeSocket);
|
||||
m_Client = std::make_unique<client::Client>(clientFakeSocket);
|
||||
|
||||
game::WorldPtr clientWorld = GetWorld();
|
||||
|
||||
// render
|
||||
m_Renderer.AddRenderer<render::WorldRenderer>(m_Camera, *clientWorld);
|
||||
m_Renderer.AddRenderer<render::EntityRenderer>(m_Camera, *clientWorld);
|
||||
m_Renderer.AddRenderer<render::TowerRenderer>(m_Camera, *clientWorld);
|
||||
|
||||
// camera
|
||||
m_Camera.SetCamPos({77, 7, 13});
|
||||
m_Camera.UpdatePerspective(m_StateMachine.GetAspectRatio());
|
||||
|
||||
// states
|
||||
m_ClientState = m_Client->ChangeState<client::GameState>(clientWorld, STEP_TIME);
|
||||
m_Server->ChangeState<server::GameState>(serverWorld);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user