Exemplo n.º 1
0
 public void remove(LBody body) {
   ArrayList shapes = body.getLShape().getBox2DFixtures();
   for (int i = 0; i < shapes.size(); i++) {
     this.shapeMap.remove(shapes.get(i));
   }
   body.removeFromWorld(this);
   this.bodies.remove(body);
 }
Exemplo n.º 2
0
 public void add(LBody body) {
   body.addToWorld(this);
   ArrayList<FixtureDef> shapes = body.getLShape().getBox2DFixtures();
   for (int i = 0; i < shapes.size(); i++) {
     this.shapeMap.put(shapes.get(i), body);
   }
   this.bodies.add(body);
 }