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();

 

 

 

你可能感兴趣的:(cocos2d-x)