Example #1
0
  public void createBody() {
    BodyDef bdef = getBodyDef();
    FixtureDef fdef = getFixtureDef();

    if (mBody != null) {
      mWorld.removeBodySafely(mBody);
    }
    mBody = mWorld.addBody(bdef);
    Fixture fix = mBody.createFixture(fdef);

    bodyCreated(mBody, fix);
  }
Example #2
0
 public void dispose() {
   mWorld.removeBodySafely(mBody);
 }