aboutsummaryrefslogtreecommitdiffstats
path: root/src/physics.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/physics.hpp')
-rw-r--r--src/physics.hpp9
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_