版权声明:本文为博主原创文章。未经博主同意不得转载。
https://blog.csdn.net/cuit/article/details/26729633
分为两种:
- 缓动。IntervalAction
- 瞬时,InstantAction
位置变化的操作包含:
- MoveBy/MoveTo
- JumpBy/JumpTo
- BezierBy/BezierTo
- Place
缩放的操作包含:
- ScaleBy/ScaleTo
旋转
- RotateBy/RotateTo
可见性
- Show
- Hide
- Blink
- ToggleVisibility
透明度
- FadeIn/FadeOut/FadeTo
颜色
- TintBy/TintTo
比如:
CCSprite *sprite = CCSprite::create("Images/grossini.png");
sprite->setPosition(ccp(100, 100)); addChild(sprite);
CCMoveBy* act1 = CCMoveBy::create(0.5, ccp(100, 0));
sprite->runAction(CCRepeat::create(act1, 1));