Killfeed should work now.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "../../Engine/Core/System.h"
|
||||
#include "../../Engine/GLM.h"
|
||||
#include "Core/EPlayerDeath.h"
|
||||
#include "Network/EKillDeath.h"
|
||||
|
||||
class KillFeedSystem : public ImpureSystem
|
||||
{
|
||||
@@ -11,8 +11,7 @@ public:
|
||||
KillFeedSystem(SystemParams params)
|
||||
: System(params)
|
||||
{
|
||||
EVENT_SUBSCRIBE_MEMBER(m_EPlayerDeath, &KillFeedSystem::OnPlayerDeath);
|
||||
|
||||
EVENT_SUBSCRIBE_MEMBER(m_EKillDeath, &KillFeedSystem::OnPlayerKillDeath)
|
||||
}
|
||||
|
||||
virtual void Update(double dt) override;
|
||||
@@ -22,16 +21,30 @@ private:
|
||||
|
||||
|
||||
|
||||
EventRelay<KillFeedSystem, Events::PlayerDeath> m_EPlayerDeath;
|
||||
bool KillFeedSystem::OnPlayerDeath(Events::PlayerDeath& e);
|
||||
EventRelay<KillFeedSystem, Events::KillDeath> m_EKillDeath;
|
||||
bool KillFeedSystem::OnPlayerKillDeath(Events::KillDeath& e);
|
||||
|
||||
struct KillFeedInfo
|
||||
{
|
||||
std::string Content;
|
||||
glm::vec4 Color;
|
||||
std::string KillerName = "";
|
||||
int KillerClass = 0;
|
||||
int KillerID = -1;
|
||||
int KillerTeam = 0;
|
||||
std::string KillerColor = "";
|
||||
|
||||
std::string VictimName = "";
|
||||
int VictimClass = 0;
|
||||
int VictimID = -1;
|
||||
int VictimTeam = 0;
|
||||
std::string VictimColor = "";
|
||||
|
||||
bool redused;
|
||||
float TimeToLive = 5.f;
|
||||
};
|
||||
|
||||
std::string m_RedColor = "\\C08366D";
|
||||
std::string m_BlueColor = "\\C6A1208";
|
||||
|
||||
std::list<KillFeedInfo> m_DeathQueue;
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user