]> git.r.bdr.sh - rbdr/sumo/blobdiff - lib/systems/physics_world_control.js
Update dependencies
[rbdr/sumo] / lib / systems / physics_world_control.js
index 370701eca7d92a077af8fb919d973e6a61f5cc71..4ba4ec1a5ef2a3fa83f905cbcc03693cd1efd046 100644 (file)
@@ -59,20 +59,20 @@ export default class PhysicsWorldControlSystem extends System {
     this.physicalEntities = engine.getNodes(PhysicalNode);
     this.grabAreaEntities = engine.getNodes(GrabAreaNode);
 
     this.physicalEntities = engine.getNodes(PhysicalNode);
     this.grabAreaEntities = engine.getNodes(GrabAreaNode);
 
-    this.physicalEntities.on('nodeAdded', (event) => {
+    this.physicalEntities.addEventListener('nodeAdded', (event) => {
 
       World.add(this.engine.world, [event.node.body.body]);
     });
 
       World.add(this.engine.world, [event.node.body.body]);
     });
-    this.physicalEntities.on('nodeRemoved', (event) => {
+    this.physicalEntities.addEventListener('nodeRemoved', (event) => {
 
       World.remove(this.engine.world, [event.node.body.body]);
     });
 
 
       World.remove(this.engine.world, [event.node.body.body]);
     });
 
-    this.grabAreaEntities.on('nodeAdded', (event) => {
+    this.grabAreaEntities.addEventListener('nodeAdded', (event) => {
 
       World.add(this.engine.world, [event.node.grabArea.area]);
     });
 
       World.add(this.engine.world, [event.node.grabArea.area]);
     });
-    this.grabAreaEntities.on('nodeRemoved', (event) => {
+    this.grabAreaEntities.addEventListener('nodeRemoved', (event) => {
 
       World.remove(this.engine.world, [event.node.grabArea.area]);
     });
 
       World.remove(this.engine.world, [event.node.grabArea.area]);
     });
@@ -109,5 +109,5 @@ export default class PhysicsWorldControlSystem extends System {
 
     Engine.update(this.engine, currentFrameDuration);
   }
 
     Engine.update(this.engine, currentFrameDuration);
   }
-};
+}