add bots
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <td/render/Renderer.h>
|
||||
#include <td/simulation/ClientSimulation.h>
|
||||
#include <client/state/GameState.h>
|
||||
#include <server/socket/FakeSocket.h>
|
||||
|
||||
namespace td {
|
||||
|
||||
@@ -13,11 +14,13 @@ class DebugWorldState : public DisplayState {
|
||||
private:
|
||||
render::RenderPipeline m_Renderer;
|
||||
render::Camera m_Camera;
|
||||
std::unique_ptr<client::Client> m_Client;
|
||||
std::unique_ptr<client::Client> m_Client2;
|
||||
std::unique_ptr<server::Server> m_Server;
|
||||
std::unique_ptr<client::Client> m_Client;
|
||||
client::GameState* m_ClientState;
|
||||
|
||||
std::vector<std::unique_ptr<client::Client>> m_FakeClients;
|
||||
std::shared_ptr<server::FakeSocket> m_ServerSocket;
|
||||
|
||||
public:
|
||||
DebugWorldState(Display& a_Display);
|
||||
~DebugWorldState();
|
||||
|
||||
@@ -42,8 +42,11 @@ class RenderPipeline {
|
||||
virtual ~RenderPipeline() {}
|
||||
|
||||
template <typename T, typename... Args>
|
||||
void AddRenderer(Args&&... args) {
|
||||
m_Renderers.push_back(std::make_unique<T>(args...));
|
||||
T& AddRenderer(Args&&... args) {
|
||||
auto ptr = std::make_unique<T>(args...);
|
||||
auto rawPtr = ptr.get();
|
||||
m_Renderers.push_back(std::move(ptr));
|
||||
return *rawPtr;
|
||||
}
|
||||
|
||||
void Clear() {
|
||||
|
||||
@@ -6,10 +6,17 @@
|
||||
namespace td {
|
||||
namespace render {
|
||||
|
||||
/**
|
||||
* \brief This is a debug class
|
||||
*/
|
||||
class PlayerListRenderer : public BasicRenderer {
|
||||
private:
|
||||
const client::PlayerManager& m_Players;
|
||||
public:
|
||||
utils::Signal<> OnPlayerCreate;
|
||||
// utils::Signal<> OnRequestPOV;
|
||||
utils::Signal<PlayerID> OnPlayerKick;
|
||||
|
||||
virtual void Render(float a_Lerp) override;
|
||||
|
||||
PlayerListRenderer(const client::PlayerManager& a_Players);
|
||||
|
||||
Reference in New Issue
Block a user