Created "EntitySystem" class as means to group a World with a SystemPipeline

This commit is contained in:
2016-02-24 15:27:41 +01:00
parent 4aaba03852
commit 7cd4dac909
19 changed files with 370 additions and 135 deletions
@@ -8,7 +8,6 @@
#include "Core/System.h"
#include "Engine/Collision/ETrigger.h"
#include "Events/ECaptured.h"
#include "Events/EWin.h"
#include <tuple>
#include <vector>
@@ -0,0 +1,27 @@
#include "Core/System.h"
#include "Events/EGameStart.h"
#include "Events/EGameEnd.h"
#include "Events/ECaptured.h"
#include "Events/EWin.h"
class CapturePointsGamemode : public ImpureSystem
{
public:
CapturePointsGamemode(SystemParams params);
virtual void Update(double dt) override;
private:
bool m_GameRuning = false;
double m_GameTime = 0.0;
EventRelay<CapturePointsGamemode, Events::GameStart> m_EGameStart;
bool OnGameStart(const Events::GameStart& e);
EventRelay<CapturePointsGamemode, Events::Captured> m_ECaptured;
bool OnCaptured(const Events::Captured& e);
boost::optional<ComponentWrapper> currentGamemode();
bool isCurrentGamemode();
boost::optional<ComponentInfo::EnumType> winCondition();
void setRunning(bool running);
};