Modification to comply with cocos2d-x v3.0 api