GB2ShapeCache for cocos2d-x-2.0

Hi All,

I have updated the GB2ShapeCache reader class to work with the newest branch of cocos2d-x, 2.0. The class is designed to load the .plist file generated by PhysicsEditor, the tool designed by Andreas Loew (found at: http://www.codeandweb.com/). The .plist file allows you to create the Box2D shapes in PhysicsEditor and attach them to your object with the code below.

This update handles the deprecation of CCMutableDictionary and CCMutableArray. Check out the project page on my site for download or links to the source on github: http://www.channon.us/?page_id=48

A quick summary of how to use:

Add the shapes into the ShapeCache:

GB2ShapeCache::sharedGB2ShapeCache()->addShapesWithFile((name + ".plist").c_str());

Load shape from shapename and add to Box2D body:

GB2ShapeCache *shapeCache = GB2ShapeCache::sharedGB2ShapeCache(); shapeCache->addFixturesToBody(_body, shapeName->getCString());

You can also find the source here on GitHub: https://github.com/hannon235/GBox2DX

-Chris Hannon
http://channon.us

Chris Hannon,

You’ve done a great work!
Unfortunately this doesn’t apply for Chipmunk or Does it? If it does please point me to a link with example? Thanks in advance! I’m following this thread as well. http://cocos2d-x.org/boards/6/topics/16843

hey buddy i am not able to download ur code.