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); }
public void dispose() { mWorld.removeBodySafely(mBody); }