Removed Initialize function for systems.

This commit is contained in:
stiffly
2015-12-11 15:23:56 +01:00
parent 4da33ff4ec
commit 16d636a87c
5 changed files with 4 additions and 20 deletions
-1
View File
@@ -15,7 +15,6 @@ public:
, m_ComponentType(componentType)
{ }
virtual void Initialize() { }
virtual void Update(World* world, ComponentWrapper& component, double dt) = 0;
protected:
-10
View File
@@ -21,16 +21,6 @@ public:
}
}
void Initialize()
{
for (auto& pair : m_Systems) {
auto& systems = pair.second;
for (auto& system : systems) {
system->Initialize();
}
}
}
template <typename T, typename... Arguments>
void AddSystem(Arguments... args)
{
+4 -2
View File
@@ -23,9 +23,11 @@ class PlayerSystem : public System
public:
PlayerSystem(EventBroker* eventBroker)
: System(eventBroker, "Player")
{ }
{
EVENT_SUBSCRIBE_MEMBER(m_EKeyDown, &PlayerSystem::OnKeyDown);
EVENT_SUBSCRIBE_MEMBER(m_EKeyUp, &PlayerSystem::OnKeyUp);
}
virtual void Initialize();
virtual void Update(World* world, ComponentWrapper& player, double dt) override;
private: