代码改变世界

cocos2d-x CCLayer设置AnchorPoint无效,蛋疼

2013-05-23 23:26  油炸小白兔  阅读(360)  评论(0)    收藏  举报

新项目升级cocos2d-x的版本到了2.0以上,找不到setIsRelativeAnchorPoint了。。。原来这里也改了。。。

1 //等效于setIsRelativeAnchorPoint(true)
2 this->ignoreAnchorPointForPosition(false);
3 //这里不变
4 this->setAnchorPoint(ccp(0.5f,0.5f));