37aa1eaa18
# Conflicts: # include/Engine/Rendering/DrawScenePass.h # include/Engine/Rendering/RenderQueue.h # include/Engine/Rendering/RenderQueueFactory.h # include/Engine/Rendering/Renderer.h # include/Game/Game.h # resources/Schema/Components.xsd # resources/Schema/Entities/Test.xml # resources/Schema/Types/Entity.xsd # src/Engine/Rendering/DrawScenePass.cpp # src/Engine/Rendering/RenderQueueFactory.cpp # src/Engine/Rendering/Renderer.cpp # src/Game/Game.cpp
23 lines
680 B
C++
23 lines
680 B
C++
#include "Common.h"
|
|
#include "Core/System.h"
|
|
|
|
class ExplosionEffectSystem : public PureSystem
|
|
{
|
|
public:
|
|
ExplosionEffectSystem(EventBroker* eventBroker)
|
|
: PureSystem("ExplosionEffect")
|
|
{ }
|
|
|
|
virtual void UpdateComponent(World* world, EntityWrapper& entity, ComponentWrapper& component, double dt) override
|
|
{
|
|
|
|
if ((double)component["TimeSinceDeath"] > (double)component["ExplosionDuration"]) {
|
|
(double)component["TimeSinceDeath"] = 0.f;
|
|
}
|
|
(double&)component["TimeSinceDeath"] += dt;
|
|
|
|
//if ((bool)Component["Gravity"] == true) {
|
|
// (bool)Component["ExponentialAccelaration"] = false;
|
|
//}
|
|
}
|
|
}; |