Some Useful codes for cocos2dx