@Override public void destructor() { for (int i = 0; i < distanceJoints.length; ++i) { world.destroyJoint(distanceJoints[i]); } }
/** Destroy a joint. This may cause the connected bodies to begin colliding. * @warning This function is locked during callbacks. */ public void destroyJoint (Joint joint) { joint.setUserData(null); world.destroyJoint(joint.joint); joints.remove(joint.joint); }
/** Destroy a rigid body given a definition. No reference to the definition is retained. This function is locked during * callbacks. * @warning This automatically deletes all associated shapes and joints. * @warning This function is locked during callbacks. */ public void destroyBody (Body body) { JointEdge jointEdge = body.body.getJointList(); while (jointEdge != null) { JointEdge next = jointEdge.next; world.destroyJoint(jointEdge.joint); joints.remove(jointEdge.joint); jointEdge = next; } world.destroyBody(body.body); bodies.remove(body.body); for (Fixture fixture : body.fixtures) { fixtures.remove(fixture.fixture); } }
destroyJoint(je0.joint);
@Override public void destructor() { for (int i = 0; i < distanceJoints.length; ++i) { world.destroyJoint(distanceJoints[i]); } }
private void destroyMouseJoint() { if (mouseJoint != null) { m_world.destroyJoint(mouseJoint); mouseJoint = null; } }
@Override public void keyPressed(char keyChar, int keyCode) { switch (keyChar) { case 'j': if (m_rope != null) { getWorld().destroyJoint(m_rope); m_rope = null; } else { m_rope = getWorld().createJoint(m_ropeDef); } break; } }
@Override public void keyPressed(char key, int argKeyCode) { switch (key) { case 'b': for (int i = 0; i < 4; ++i) { if (m_bodies[i] != null) { getWorld().destroyBody(m_bodies[i]); m_bodies[i] = null; break; } } break; case 'j': for (int i = 0; i < 8; ++i) { if (m_joints[i] != null) { getWorld().destroyJoint(m_joints[i]); m_joints[i] = null; break; } } break; } }
@Override public void destructor() { for (int i = 0; i < distanceJoints.length; ++i) { world.destroyJoint(distanceJoints[i]); } }
@Override public void destructor() { for (int i = 0; i < distanceJoints.length; ++i) { world.destroyJoint(distanceJoints[i]); } }
@Override public void destructor() { for (int i = 0; i < distanceJoints.length; ++i) { world.destroyJoint(distanceJoints[i]); } }
destroyJoint(je0.joint);
/** * Called for mouse-up * * @param p */ public void mouseUp(Vec2 p) { if (mouseJoint != null) { m_world.destroyJoint(mouseJoint); mouseJoint = null; } if (bombSpawning) { completeBombSpawn(p); } }
@Override public void keyPressed(char keyChar, int keyCode) { switch (keyChar) { case 'j': if (m_rope != null) { getWorld().destroyJoint(m_rope); m_rope = null; } else { m_rope = getWorld().createJoint(m_ropeDef); } break; } }
@Override public void keyPressed(char key, int argKeyCode) { switch (key) { case 'b': for (int i = 0; i < 4; ++i) { if (m_bodies[i] != null) { getWorld().destroyBody(m_bodies[i]); m_bodies[i] = null; break; } } break; case 'j': for (int i = 0; i < 8; ++i) { if (m_joints[i] != null) { getWorld().destroyJoint(m_joints[i]); m_joints[i] = null; break; } } break; } }
destroyJoint(je0.joint);
destroyJoint(je0.joint);