`
jenth
  • 浏览: 32525 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

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

 

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics