cocos2

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:13:26
Original
1108 people have browsed it

cocos2d-x3.0节点特效需要借助NodeGrid。 span style=color:#330033;Sprite *sp_test = Sprite::create(test/hair.png);span style=font-size:14px; ActionInterval */spanspan style=font-size:14px; shaky3D/spanspan style=font-size:14px; = Shaky3D::cr

cocos2d-x3.0节点特效需要借助NodeGrid。

<span style="color:#330033;">Sprite *sp_test = Sprite::create("test/hair.png");
<span style="font-size:14px; ">ActionInterval * </span><span style="font-size:14px; ">shaky3D</span><span style="font-size:14px; "> = Shaky3D::create(20, Size(6, 2),5,true);</span>
auto nodeGride = NodeGrid::create();
nodeGride->addChild(sp_test);
nodeGride->setPosition(p_test);
nodeGride->runAction(pageTurn3D);
this->addChild(nodeGride);</span>
Copy after login


//3D晃动特效

//参数1:持续时间
//参数2:网格大小
//参数3:波动范围
//参数4:是否z轴晃动

ActionInterval * shaky3D = Shaky3D::create(20, Size(6, 2),5,true);


//3D瓷砖晃动的特效
//参数1:持续时间
//参数2:网格大小
//参数3:波动范围
//参数4:是否z轴晃动
ActionInterval * shakyTiles3D = ShakyTiles3D::create(20, Size(6, 2),2,false);


//一个波动特效
//参数1:持续时间
//参数2:网格大小
//参数3:波动频率
//参数4:振幅
//参数5:是否垂直波动
//参数6:是否水平波动
ActionInterval * waves = Waves::create(20, Size(4, 2),6,5,false,true);


//一个3D波动特效
//参数1:持续时间
//参数2:网格大小
//参数3:波动频率
//参数4:振幅
ActionInterval * waves3D = Waves3D::create(20, Size(4, 2),6,5);


//3D瓷砖波动特效
//参数1:持续时间
//参数2:网格大小
//参数3:波动频率
//参数4:振幅
ActionInterval * wavesTiles3D = WavesTiles3D::create(20, Size(4, 2),6,5);


//x轴3D反转特效
//参数1:持续时间
ActionInterval * flipX3D = FlipX3D::create(2);


//y轴3D反转特效
//参数1:持续时间
ActionInterval * flipY3D = FlipY3D::create(2);


//凸镜特效
//参数1:持续时间
//参数2:网格大小
//参数3:中心点位置
//参数4:半径
ActionInterval * lens3D = Lens3D::create(6,Size(6, 6),Point(100,100),6);


//水波特效
//参数1:持续时间
//参数2:网格大小
//参数3:中心点位置
//参数4:半径
ActionInterval * ripple3D = Ripple3D::create(6,Size(6, 6),p_test,2,9,9);


//液体特效
//参数1:持续时间
//参数2:网格大小
//参数3:波动
//参数4:振幅
ActionInterval * liquid = Liquid::create(20,Size(6, 6),2,9);


//扭曲旋转特效
//参数1:持续时间
//参数2:网格大小
//参数3:位置
//参数4:旋转幅度
//参数5:振幅
ActionInterval *twirl = Twirl::create(20,Size(6, 6),p_test,2,9);


//瓷砖的洗牌特效
//参数1:持续时间
//参数2:网格大小
//参数3:速度
ActionInterval *shuffleTiles = ShuffleTiles::create(20,Size(6, 6),3);


//破碎的3D瓷砖特效
//参数1:持续时间
//参数2:网格大小
//参数3:范围
//参数4:是否z轴
ActionInterval *shatteredTiles3D = ShatteredTiles3D::create(20,Size(6, 6),3,false);


//部落格效果 , 从左下角到右下角
//参数1:持续时间
//参数2:网格大小
ActionInterval *shatteredTiles3D = FadeOutTRTiles::create(20,Size(6, 6));


//部落格效果 , 从左下角到右下角
//参数1:持续时间
//参数2:网格大小
ActionInterval *shatteredTiles3D = FadeOutTRTiles::create(2,Size(36, 36));


//部落格效果 , 从右下角到左下角
//参数1:持续时间
//参数2:网格大小
ActionInterval *fadeOutBLTiles = FadeOutBLTiles::create(2,Size(36, 36));


//折叠效果 从下到上
//参数1:持续时间
//参数2:网格大小
ActionInterval *fadeOutUpTiles = FadeOutUpTiles::create(2,Size(36, 36));


//折叠效果 从上到下
//参数1:持续时间
//参数2:网格大小
ActionInterval *fadeOutDownTiles = FadeOutDownTiles::create(2,Size(36, 36));


//方块消失特效
//参数1:持续时间
//参数2:网格大小
ActionInterval *turnOffTiles = TurnOffTiles::create(2,Size(36, 36));


//跳动的方格特效
//参数1:持续时间
//参数2:网格大小
//参数3:跳动次数
//参数4:振幅
ActionInterval *jumpTiles3D = JumpTiles3D::create(2,Size(36, 36),10,6);


//分多行消失特效
//参数1:持续时间
//参数1:行数
ActionInterval *splitRows = SplitRows::create(2,6);


//分多列消失特效
//参数1:持续时间
//参数1:列数
ActionInterval *splitRows = SplitRows::create(2,6);


//3D翻页特效
//参数1:持续时间
//参数1:网格大小
ActionInterval *pageTurn3D = PageTurn3D::create(2,Size(36, 36));


http://blog.csdn.net/st75033562/article/details/29574939

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template