getAnchorPoint cocos2d-x 中关于描点的

来源:互联网 发布:激战2人女捏脸数据 编辑:程序博客网 时间:2024/06/05 01:15
CCSprite *pdatefram = CCSprite::createWithSpriteFrameName("trainselectframe.png");
CCPoint p = pdatefram->getAnchorPoint();
默认描点为(0.5,0.5);
CCNode *nnode = CCNode::create();
p = nnode->getAnchorPoint();
默认描点为(0,0);

CCLayer *player = CCLayer::create();
p = player->getAnchorPoint();
默认描点为(0.5,0.5);

CCMenu *pmenu = CCMenu::create();

p = pmenu->getAnchorPoint();

默认描点为(0.5,0.5);

原创粉丝点击