2 new Events: ECaptured, EWin

Added new variable in CapturePoint: IsHomeCapturePointForTeam
CapturePointSystem updated so -5 = team 2 owns it, +5 = team 1 owns it. Its also looking for a winner each update
Updated Test. TODO: better Tests
This commit is contained in:
verysecrethero
2016-01-12 17:38:02 +01:00
parent 59be714fdc
commit 3a1056a2c3
7 changed files with 88 additions and 10 deletions
+4
View File
@@ -7,6 +7,8 @@
#include "Common.h"
#include "Core/System.h"
#include "Engine/Collision/ETrigger.h"
#include "Core/ECaptured.h"
#include "Core/EWin.h"
#include <tuple>
#include <vector>
@@ -27,6 +29,8 @@ private:
EventRelay<CapturePointSystem, Events::TriggerLeave> m_ETriggerLeave;
bool CapturePointSystem::OnTriggerLeave(const Events::TriggerLeave& e);
bool WinnerWasFound = false;
//vectors which will keep track of enter/leave changes
std::vector<std::tuple<EntityID, EntityID>> m_ETriggerTouchVector;
std::vector<std::tuple<EntityID, EntityID>> m_ETriggerLeaveVector;