Added some fields in score components to track more data. Added some logic to the ScoreSystem class

This commit is contained in:
Tleety
2016-03-03 09:49:20 +01:00
parent 40c66f76ae
commit 27d3ec4118
6 changed files with 81 additions and 7 deletions
+13 -2
View File
@@ -14,9 +14,20 @@ public:
virtual void UpdateComponent(EntityWrapper& entity, ComponentWrapper& capturePoint, double dt) override;
EventRelay<ScoreScreenSystem, Events::PlayerDeath> m_EPlayerDeath;
void OnPlayerDeath(const Events::PlayerDeath& e);
bool OnPlayerDeath(const Events::PlayerDeath& e);
EventRelay<ScoreScreenSystem, Events::PlayerSpawned> m_EPlayerSpawned;
void OnPlayerSpawn(const Events::PlayerSpawned& e);
bool OnPlayerSpawn(const Events::PlayerSpawned& e);
private:
struct PlayerData {
int ID = -1;
std::string Name = "";
int Team = -1;
EntityWrapper Player = EntityWrapper::Invalid;
};
int m_PlayerCounter = 0;
std::unordered_map<std::string, PlayerData> m_PlayerIdentities;
};
#endif