Changed DamageIndicator.xml to not use a glowmap and not a depthsort.
This commit is contained in:
@@ -13,10 +13,12 @@
|
||||
#include <glm/gtc/quaternion.hpp>
|
||||
#include <glm/gtx/vector_angle.hpp>
|
||||
|
||||
#include "Rendering/Util/CommonFunctions.h"
|
||||
|
||||
class DamageIndicatorSystem : public System
|
||||
{
|
||||
public:
|
||||
DamageIndicatorSystem(World* world, EventBroker* eventBroker);
|
||||
DamageIndicatorSystem(SystemParams params);
|
||||
|
||||
private:
|
||||
EventRelay<DamageIndicatorSystem, Events::PlayerDamage> m_DamageTakenFromPlayer;
|
||||
@@ -26,5 +28,6 @@ private:
|
||||
bool OnSetCamera(const Events::SetCamera& e);
|
||||
|
||||
EntityID m_CurrentCamera = -1;
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
|
||||
<Components>
|
||||
<c:Sprite>
|
||||
<DiffuseTexture>Textures/TempDamageIndicator.png</DiffuseTexture>
|
||||
<GlowMap>Textures/TempDamageIndicator.png</GlowMap>
|
||||
<DiffuseTexture>Textures/DamageIndicator.png</DiffuseTexture>
|
||||
<GlowMap></GlowMap>
|
||||
<DepthSort>false</DepthSort>
|
||||
<Color A="1" B="0.721568644" G="1" R="0.839215696"/>
|
||||
</c:Sprite>
|
||||
<c:Transform>
|
||||
|
||||
@@ -382,14 +382,10 @@
|
||||
</Entity>
|
||||
<Entity name="PlayerModel">
|
||||
<Components>
|
||||
<c:Animation>
|
||||
<Name>Hold Pos</Name>
|
||||
<Time>0.60114094473865531</Time>
|
||||
<Speed>1</Speed>
|
||||
</c:Animation>
|
||||
<c:Animation/>
|
||||
<c:HiddenForLocalPlayer/>
|
||||
<c:Model>
|
||||
<Resource>Models/AssaultAnimated.mesh</Resource>
|
||||
<Resource>Models/Characters/Assault/AssaultAnimations.mesh</Resource>
|
||||
<Color A="1" B="0" G="0" R="1"/>
|
||||
</c:Model>
|
||||
<c:Transform/>
|
||||
|
||||
@@ -16,6 +16,9 @@ void CapturePointHUDSystem::Update(double dt)
|
||||
|
||||
auto CapturePointHUDElements = m_World->GetComponents("CapturePointHUD");
|
||||
auto CapturePoints = m_World->GetComponents("CapturePoint");
|
||||
if (CapturePointHUDElements == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (auto& cCapturePointHUD : *CapturePointHUDElements) {
|
||||
int HUD_ID = cCapturePointHUD["CapturePointNumber"];
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
#include "Systems/DamageIndicatorSystem.h"
|
||||
|
||||
DamageIndicatorSystem::DamageIndicatorSystem(World* m_World, EventBroker* eventBroker)
|
||||
: System(m_World, eventBroker)
|
||||
DamageIndicatorSystem::DamageIndicatorSystem(SystemParams params)
|
||||
: System(params)
|
||||
{
|
||||
EVENT_SUBSCRIBE_MEMBER(m_DamageTakenFromPlayer, &DamageIndicatorSystem::OnPlayerDamageTaken);
|
||||
//current camera
|
||||
EVENT_SUBSCRIBE_MEMBER(m_ESetCamera, &DamageIndicatorSystem::OnSetCamera);
|
||||
|
||||
//load texture to cache
|
||||
auto texture = CommonFunctions::LoadTexture("Textures/DamageIndicator.png", false);
|
||||
auto entityFile = ResourceManager::Load<EntityFile>("Schema/Entities/DamageIndicator.xml");
|
||||
}
|
||||
|
||||
bool DamageIndicatorSystem::OnPlayerDamageTaken(Events::PlayerDamage& e)
|
||||
@@ -58,4 +62,4 @@ bool DamageIndicatorSystem::OnPlayerDamageTaken(Events::PlayerDamage& e)
|
||||
bool DamageIndicatorSystem::OnSetCamera(const Events::SetCamera& e) {
|
||||
m_CurrentCamera = e.CameraEntity.ID;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user