Many more things done

This commit is contained in:
Ayumiwii
2016-01-11 19:59:45 +01:00
parent 3467315aef
commit 0630885d92
13 changed files with 153 additions and 37 deletions
+20
View File
@@ -0,0 +1,20 @@
#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["EndOfDeath"]) {
(double)Component["TimeSinceDeath"] = 0.f;
}
(double&)Component["TimeSinceDeath"] += dt;
}
};