HUD for capture points now update with Capture point data.
This commit is contained in:
@@ -1,55 +1,49 @@
|
||||
#ifndef CapturePointSystem_h__
|
||||
#define CapturePointSystem_h__
|
||||
#ifndef CapturePointHUDSystem_h__
|
||||
#define CapturePointHUDSystem_h__
|
||||
|
||||
#include <GLFW/glfw3.h>
|
||||
#include <glm/common.hpp>
|
||||
#include <glm/gtc/quaternion.hpp>
|
||||
|
||||
#include "Common.h"
|
||||
#include "Core/System.h"
|
||||
#include "Engine/Collision/ETrigger.h"
|
||||
#include "Core/ECaptured.h"
|
||||
#include "Core/EWin.h"
|
||||
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
|
||||
class CapturePointSystem : public PureSystem
|
||||
class CapturePointHUDSystem : public ImpureSystem
|
||||
{
|
||||
public:
|
||||
//WARNING: on new map, destroy all info in the vectors, as well as reset all variables (just make new?)
|
||||
CapturePointSystem(World* world, EventBroker* eventBroker);
|
||||
CapturePointHUDSystem(World* world, EventBroker* eventBroker);
|
||||
|
||||
//updatecomponent
|
||||
virtual void UpdateComponent(EntityWrapper& entity, ComponentWrapper& capturePoint, double dt) override;
|
||||
virtual void Update(double dt) override;
|
||||
|
||||
private:
|
||||
//methods which will take care of specific events
|
||||
EventRelay<CapturePointSystem, Events::TriggerTouch> m_ETriggerTouch;
|
||||
/* EventRelay<CapturePointSystem, Events::TriggerTouch> m_ETriggerTouch;
|
||||
bool CapturePointSystem::OnTriggerTouch(const Events::TriggerTouch& e);
|
||||
EventRelay<CapturePointSystem, Events::TriggerLeave> m_ETriggerLeave;
|
||||
bool CapturePointSystem::OnTriggerLeave(const Events::TriggerLeave& e);
|
||||
EventRelay<CapturePointSystem, Events::Captured> m_ECaptured;
|
||||
bool CapturePointSystem::OnCaptured(const Events::Captured& e);
|
||||
bool CapturePointSystem::OnCaptured(const Events::Captured& e);*/
|
||||
|
||||
bool m_WinnerWasFound = false;
|
||||
//need to track these variables for the captureSystem to work as per design!
|
||||
const int m_NotACapturePoint = 999;
|
||||
int m_RedTeamNextPossibleCapturePoint = m_NotACapturePoint;
|
||||
int m_BlueTeamNextPossibleCapturePoint = m_NotACapturePoint;
|
||||
int m_RedTeamHomeCapturePoint = m_NotACapturePoint;
|
||||
int m_BlueTeamHomeCapturePoint = m_NotACapturePoint;
|
||||
//bool m_WinnerWasFound = false;
|
||||
////need to track these variables for the captureSystem to work as per design!
|
||||
//const int m_NotACapturePoint = 999;
|
||||
//int m_RedTeamNextPossibleCapturePoint = m_NotACapturePoint;
|
||||
//int m_BlueTeamNextPossibleCapturePoint = m_NotACapturePoint;
|
||||
//int m_RedTeamHomeCapturePoint = m_NotACapturePoint;
|
||||
//int m_BlueTeamHomeCapturePoint = m_NotACapturePoint;
|
||||
|
||||
int m_NumberOfCapturePoints = 0;
|
||||
std::map<int, EntityWrapper> m_CapturePointNumberToEntityMap;
|
||||
//int m_NumberOfCapturePoints = 0;
|
||||
//std::map<int, EntityWrapper> m_CapturePointNumberToEntityMap;
|
||||
|
||||
//std::vector<ComponentWrapper>
|
||||
////std::vector<ComponentWrapper>
|
||||
|
||||
const double m_CaptureTimeToTakeOver = 15.0;
|
||||
bool m_ResetTimers = false;
|
||||
//const double m_CaptureTimeToTakeOver = 15.0;
|
||||
//bool m_ResetTimers = false;
|
||||
|
||||
//vectors which will keep track of enter/leave changes
|
||||
std::vector<std::tuple<EntityWrapper, EntityWrapper>> m_ETriggerTouchVector;
|
||||
std::vector<std::tuple<EntityWrapper, EntityWrapper>> m_ETriggerLeaveVector;
|
||||
////vectors which will keep track of enter/leave changes
|
||||
//std::vector<std::tuple<EntityWrapper, EntityWrapper>> m_ETriggerTouchVector;
|
||||
//std::vector<std::tuple<EntityWrapper, EntityWrapper>> m_ETriggerLeaveVector;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user