applied cocos2d-x coding style