diff options
author | Andy Belle-Isle <drumsetmonkey@gmail.com> | 2019-09-17 19:09:33 -0400 |
---|---|---|
committer | Andy Belle-Isle <drumsetmonkey@gmail.com> | 2019-09-17 19:09:33 -0400 |
commit | 2cedd39a90fdb0387783b50446b16732517fb651 (patch) | |
tree | 78efc6f36096b7e0e0ff200220298c4ee7576bf1 /src/physics.hpp | |
parent | 0236eb7f6391c9d925dcaaddb8cb01ecfb7d5e55 (diff) |
World can now draw properly, and camera follows player
Diffstat (limited to 'src/physics.hpp')
-rw-r--r-- | src/physics.hpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/physics.hpp b/src/physics.hpp index 8231d6d..db93999 100644 --- a/src/physics.hpp +++ b/src/physics.hpp @@ -24,13 +24,18 @@ #include <entityx/entityx.h> #include <sol/sol.hpp> +#include "world.hpp" +#include "events/world.hpp" + /** * @class PhysicsSystem * Handles the position and velocity updating of all entities */ -class PhysicsSystem : public entityx::System<PhysicsSystem> +class PhysicsSystem : public entityx::System<PhysicsSystem>, + public entityx::Receiver<PhysicsSystem> { private: + World* currentWorld; public: PhysicsSystem(void) {} @@ -49,6 +54,8 @@ public: void update(entityx::EntityManager& entites, entityx::EventManager& events, entityx::TimeDelta dt) final; + + void receive(const WorldChangeEvent& wce); }; #endif // SYSTEM_PHYSICS_HPP_ |