#include "Core/System.h" #include "Input/EInputCommand.h" #include "Systems/SpawnerSystem.h" #include "Events/ESpawnerSpawn.h" #include "Core/EPlayerSpawned.h" #include "Core/EPlayerDeath.h" #include "Rendering/ESetCamera.h" #include "Core/ConfigFile.h" class PlayerSpawnSystem : public ImpureSystem { public: PlayerSpawnSystem(SystemParams params); virtual void Update(double dt) override; private: struct SpawnRequest { int PlayerID; ComponentInfo::EnumType Team; }; bool m_NetworkEnabled = false; std::vector m_SpawnRequests; std::map m_PlayerEntities; EventRelay m_OnInputCommand; bool OnInputCommand(const Events::InputCommand& e); EventRelay m_OnPlayerSpawnerd; bool OnPlayerSpawned(Events::PlayerSpawned& e); };