#include <SpriteTest.h>
◆ SpriteBatchNodeAnchorPoint()
| SpriteBatchNodeAnchorPoint::SpriteBatchNodeAnchorPoint |
( |
| ) |
|
在文件 SpriteTest.cpp 第 1157 行定义.
1161 auto batch = SpriteBatchNode::create(
"Images/grossini_dance_atlas.png", 1);
1164 auto s = Director::getInstance()->getWinSize();
1167 auto rotate = RotateBy::create(10, 360);
1168 auto action = RepeatForever::create(rotate);
1169 for(
int i=0;i<3;i++)
1171 auto sprite = Sprite::createWithTexture(batch->getTexture(), Rect(85*i, 121*1, 85, 121));
1172 sprite->setPosition( Vec2( s.width/4*(i+1), s.height/2) );
1174 auto point = Sprite::create(
"Images/r1.png");
1175 point->setScale( 0.25f );
1176 point->setPosition( sprite->getPosition() );
1182 sprite->setAnchorPoint( Vec2::ANCHOR_BOTTOM_LEFT );
1185 sprite->setAnchorPoint( Vec2::ANCHOR_MIDDLE );
1188 sprite->setAnchorPoint( Vec2::ANCHOR_TOP_RIGHT );
1192 point->setPosition( sprite->getPosition() );
1194 sprite->runAction( action->clone() );
1195 batch->addChild(sprite, i);
引用了 kTagSpriteBatchNode.
◆ CREATE_FUNC()
◆ subtitle()
| std::string SpriteBatchNodeAnchorPoint::subtitle |
( |
| ) |
const |
|
overridevirtual |
◆ title()
| std::string SpriteBatchNodeAnchorPoint::title |
( |
| ) |
const |
|
overridevirtual |
该类的文档由以下文件生成:
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/SpriteTest/SpriteTest.h
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/SpriteTest/SpriteTest.cpp