Adapted Escape the Dawn engine.

This commit is contained in:
2014-04-04 23:14:18 +02:00
parent 6a64de37fb
commit a7985b1686
64 changed files with 3384 additions and 79 deletions
Executable
+34
View File
@@ -0,0 +1,34 @@
#ifndef System_h__
#define System_h__
#include "Factory.h"
#include "Entity.h"
#include "Component.h"
class World;
class System
{
public:
System(World* world) : m_World(world) { }
virtual ~System() { }
virtual void Initialize() { }
// Called once per system every tick
virtual void Update(double dt) { }
// Called once for every entity in the world every tick
virtual void UpdateEntity(double dt, EntityID entity, EntityID parent) { }
// Called when a component is created
virtual void OnComponentCreated(std::string type, std::shared_ptr<Component> component) { }
// Called when a component is removed
virtual void OnComponentRemoved(std::string type, Component* component) { }
protected:
World* m_World;
};
class SystemFactory : public Factory<System*> { };
#endif // System_h__