Skip to content

Instantly share code, notes, and snippets.

@takashi1975
Last active April 18, 2016 13:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takashi1975/391a193c36fd8a32409638beab706b05 to your computer and use it in GitHub Desktop.
Save takashi1975/391a193c36fd8a32409638beab706b05 to your computer and use it in GitHub Desktop.
Box2d Memo (for Cocos2d-x ver.3.x)
//world ... b2World
{
//DestroyBody -> DestroyJoint
for (auto body = world->GetBodyList(); body; body = body->GetNext())
{
world->DestroyBody(body);
}
// for (auto joint = world->GetJointList(); joint; joint = joint->GetNext())
// {
// world->DestroyJoint(joint);
// }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment