Added a very basic PlayerSystem, and a PlayerComponent.

This commit is contained in:
stiffly
2015-12-11 13:45:19 +01:00
parent 6326a60a79
commit 80f028edf2
10 changed files with 121 additions and 7 deletions
+4 -3
View File
@@ -10,16 +10,17 @@ class System
friend class SystemPipeline;
public:
System(const EventBroker* eventBroker, std::string componentType)
System(EventBroker* eventBroker, std::string componentType)
: m_EventBroker(eventBroker)
, m_ComponentType(componentType)
{ }
virtual void Initialize();
virtual void Update(World* world, ComponentWrapper& component, double dt) = 0;
private:
const EventBroker* m_EventBroker;
std::string m_ComponentType;
EventBroker* m_EventBroker;
};
#endif
+2 -2
View File
@@ -9,7 +9,7 @@
class SystemPipeline
{
public:
SystemPipeline(const EventBroker* eventBroker)
SystemPipeline(EventBroker* eventBroker)
: m_EventBroker(eventBroker)
{ }
~SystemPipeline()
@@ -51,7 +51,7 @@ public:
}
private:
const EventBroker* m_EventBroker;
EventBroker* m_EventBroker;
std::unordered_map<std::string, std::vector<System*>> m_Systems;
};