CCSprite* sp = CCSprite::create("Default.png");
sp->setPosition(ccp(240, 160));
addChild(sp);
//常见的22种特效
//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);
cocos2d-x 22种特效
最新推荐文章于 2023-05-31 15:19:39 发布