Ported the code to work with Cocos2D iPhone v3 (develop-v3 branch)

I ported the classes to work with the latest development version of Cocos2D v3.