Added a very basic PlayerSystem, and a PlayerComponent.
This commit is contained in:
@@ -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
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user