标签:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// add "HelloWorld" splash screen" auto sprite = Sprite::create( "HelloWorld.png" ); // position the sprite on the center of the screen sprite->setPosition(Vec2(visibleSize.width/2 + origin.x, visibleSize.height/2 + origin.y)); // add the sprite as a child to this layer //this->addChild(sprite, 0); auto nodegrid = NodeGrid::create(); nodegrid->addChild(sprite); this ->addChild(nodegrid); //run Shaky3D action auto shaky3D = Shaky3D::create(5, CCSize(10, 10), 15, false ); nodegrid->runAction(shaky3D); |
//3D晃动的特效 // CCActionInterval* shaky3D = CCShaky3D::create(5, CCSize(10, 10), 15, false); // sp->runAction(shaky3D);
//3D瓷砖晃动特效 // CCActionInterval* shakyTiles3D = CCShakyTiles3D::create(5, CCSize(10, 10), 5, false); // sp->runAction(shakyTiles3D);
//波动特效 // CCActionInterval* waves = CCWaves::create(5, CCSize(10, 10), 10, 20, true, true); // sp->runAction(waves);
//3D波动特效 // CCActionInterval* waves3D = CCWaves3D::create(5, CCSize(10, 10), 10, 20); // sp->runAction(waves3D);
//3D瓷砖波动特效 // CCActionInterval* wavesTiles3D = CCWavesTiles3D::create(5, CCSize(10, 10), 10, 20); // sp->runAction(wavesTiles3D);
//X轴 3D反转特效 // CCActionInterval* filpX = CCFlipX3D::create(5); // sp->runAction(filpX);
//Y轴3D反转特效 // CCActionInterval* filpY = CCFlipY3D::create(5); // sp->runAction(filpY);
//凸透镜特效 // CCActionInterval* lens = CCLens3D::create(2, CCSize(10, 10),CCPointMake(240, 160), 240); // sp->runAction(lens);
//水波纹特效 // CCActionInterval* ripple = CCRipple3D::create(5, CCSize(10, 10), CCPointMake(240, 160), 240, 4, 160); // sp->runAction(ripple);
//液体特效 // CCActionInterval* liquid = CCLiquid::create(5, CCSize(10, 10), 4, 20); // sp->runAction(liquid);
//扭曲旋转特效 // CCActionInterval* twirl = CCTwirl::create(50, CCSize(10, 10), CCPointMake(240, 160), 2, 2.5); // sp->runAction(twirl);
//破碎的3D瓷砖特效 // CCActionInterval* shatteredTiles = CCShatteredTiles3D::create(15, CCSize(10, 10), 50, true); // sp->runAction(shatteredTiles);
//瓷砖洗牌特效 // CCActionInterval* shuffle = CCShuffleTiles::create(5, CCSize(50, 50), 50); // sp->runAction(shuffle);
//部落格效果,从左下角到右上角 // CCActionInterval* fadeOutTRTiles = CCFadeOutTRTiles::create(5, CCSize(50, 50)); // sp->runAction(fadeOutTRTiles);
//部落格效果,从右上角到左下角 // CCActionInterval* fadeOutBLTiles = CCFadeOutBLTiles::create(5, CCSize(50, 50)); // sp->runAction(fadeOutBLTiles);
//折叠效果 从下到上 // CCActionInterval* fadeOutUpTiles = CCFadeOutUpTiles::create(5, CCSize(10, 10)); // sp->runAction(fadeOutUpTiles);
//折叠效果,从上到下 // CCActionInterval* fadeOutDownTiles = CCFadeOutDownTiles::create(4, CCSize(20, 50)); // sp->runAction(fadeOutDownTiles);
//方块消失特效 // CCActionInterval* turnOffFiels = CCTurnOffTiles::create(4, CCSize(50, 50)); // sp->runAction(turnOffFiels);
//跳动的方块特效 // CCActionInterval* jumpTiles = CCJumpTiles3D::create(5, CCSize(20, 20), 5, 20); // sp->runAction(jumpTiles);
//分多行消失特效 // CCActionInterval* splitCols = CCSplitCols::create(5, 50); // sp->runAction(splitCols);
//分多列消失特效 // CCActionInterval* splitRows = CCSplitRows::create(5, 50); // sp->runAction(splitRows);
//3D翻页特效 CCActionInterval* pageTurn3D = CCPageTurn3D::create(4, CCSize(20, 20)); sp->runAction(pageTurn3D);
// 效果组合
1.基本动作InstantAction
放置 – Place
隐藏 – Hide
显示 – Show
可见切换 – ToggleVisibility
2.延时动作
移动到 – CCMoveTo
移动– CCMoveBy
跳跃到 – CCJumpTo
跳跃 – CCJumpBy
贝塞尔 – CCBezierBy
放大到 – CCScaleTo 设置放大倍数,是浮点型。
放大 – CCScaleBy
旋转到 – CCRotateTo
旋转 – CCRotateBy
闪烁 – CCBlink 设定闪烁次数
色调变化到 – CCTintTo
色调变换 – CCTintBy
变暗到 – CCFadeTo
由无变亮 – CCFadeIn
由亮变无 – CCFadeOut
3.组合动作
序列 – CCSequence
同步 – Spawn
重复有线次数 – Repeate
动作反向 – Reverse
动画 – Animation
无限重复 – RepeatForever
4.速度变化
EaseIn 由慢至快。
EaseOut 由快至慢
EaseInOut 由慢至快再由快至慢。
EaseSineIn 由慢至快。
EaseSineOut 由快至慢
EaseSineInOut 由慢至快再由快至慢。
EaseExponentialIn 由慢至极快。
EaseExponentialOut 由极快至慢。
EaseExponentialInOut 由慢至极快再由极快至慢。
Speed 人工设定速度,还可通过 SetSpeed 不断调整。
5.扩展动作
延时动作 – Delay ,比如在动作序列中增加一个时间间歇
标签:
原文地址:http://www.cnblogs.com/zhangfeitao/p/4528232.html