2c0f66d9c7
# Conflicts: # include/Engine/Collision/FillFrustumOctreeSystem.h # include/Engine/Core/Octree.h # include/Engine/Rendering/RenderSystem.h # include/Game/Game.h # resources/DefaultInput.ini # resources/Schema/Components.xsd # resources/Schema/Entities/Player.xml # resources/Schema/Types/Entity.xsd # src/Engine/Rendering/RenderSystem.cpp # src/Game/Game.cpp # src/Game/Systems/PlayerMovementSystem.cpp
32 lines
904 B
C++
32 lines
904 B
C++
#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<SpawnRequest> m_SpawnRequests;
|
|
std::map<int, EntityWrapper> m_PlayerEntities;
|
|
|
|
EventRelay<PlayerSpawnSystem, Events::InputCommand> m_OnInputCommand;
|
|
bool OnInputCommand(const Events::InputCommand& e);
|
|
EventRelay<PlayerSpawnSystem, Events::PlayerSpawned> m_OnPlayerSpawnerd;
|
|
bool OnPlayerSpawned(Events::PlayerSpawned& e);
|
|
}; |