updated to work with cocos2d-x 3.0