Updated to cocos2d version 2.

Made some changes to project that make it possible to use it in cocos2d
version 1 and in cocos2d version 2.