cocos2d-x v2.0与v1.0的区别

LAYER_NODE_FUNC(World);

改为

CREATE_FUNC(World);

CCScene *scene = CCScene::node(); 

改为

CCScene *scene = CCScene::create(); 

CCTouchDispatcher::sharedDispatcher()->addTargetedDelegate(this, 0, false);

 改为:

CCDirector::sharedDirector()->getTouchDispatcher()->addTargetedDelegate(this, 0, false);

setIsVisible

改成

setVisible

setIsTouchEnabled

改成

setTouchEnabled

CCPoint endPos = pTouch->locationInView(pTouch->view());

改成

CCPoint endPos = pTouch->locationInView();

 

猜你喜欢

转载自jenth.iteye.com/blog/1829925