Files
axyz/include/Game/CoolDeathAnimationSystem.h
T
Ayumiwii 8f8b64f99c First pass that actually work
Not at all done, but it'll have to do for now
2016-01-18 11:50:00 +01:00

24 lines
763 B
C++

#include "Common.h"
#include "Core/System.h"
class CoolDeathAnimationSystem : public PureSystem
{
public:
CoolDeathAnimationSystem(EventBroker* eventBroker)
: PureSystem(eventBroker, "CoolDeathAnim")
{ }
virtual void UpdateComponent(World* world, ComponentWrapper& object, double dt) override
{
ComponentWrapper& Component = world->GetComponent(object.EntityID, "CoolDeathAnim");
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;
//}
}
};