Add to cocos2d

Need to debug.
Finish the android version.

Some details need to be adjusted.