Added a Initialize function for systems.
This commit is contained in:
@@ -17,13 +17,12 @@ public:
|
||||
: System(eventBroker, "Player")
|
||||
{ }
|
||||
|
||||
void Initialize();
|
||||
virtual void Initialize();
|
||||
virtual void Update(World* world, ComponentWrapper& player, double dt) override;
|
||||
|
||||
private:
|
||||
float m_Speed;
|
||||
glm::vec3 m_Direction;
|
||||
EventBroker* m_EventBroker;
|
||||
|
||||
EventRelay<PlayerSystem, Events::KeyDown> m_EKeyDown;
|
||||
bool OnKeyDown(const Events::KeyDown &event);
|
||||
|
||||
@@ -8,6 +8,8 @@ public:
|
||||
: System(eventBroker, "RaptorCopter")
|
||||
{ }
|
||||
|
||||
virtual void Initialize() { }
|
||||
|
||||
virtual void Update(World* world, ComponentWrapper& raptorCopter, double dt) override
|
||||
{
|
||||
ComponentWrapper& transform = world->GetComponent(raptorCopter.EntityID, "Transform");
|
||||
|
||||
Reference in New Issue
Block a user