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