3.CCFadeOutTRTiles,部落格效果,跳动的方块特效,3D瓷砖晃动特效,破碎的3D瓷砖特效,瓷砖洗牌特效,分多行消失特效,分多列消失特效

Posted lxjshuju

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了3.CCFadeOutTRTiles,部落格效果,跳动的方块特效,3D瓷砖晃动特效,破碎的3D瓷砖特效,瓷砖洗牌特效,分多行消失特效,分多列消失特效相关的知识,希望对你有一定的参考价值。

??

1 TiledGrid3D

//TiledGrid3D

//CCFadeOutTRTiles * action = CCFadeOutTRTiles::create(2,

CCSize(20,20));

//CCFadeOutBLTiles * action = CCFadeOutBLTiles::create(2,

CCSize(20,20));

//CCJumpTiles3D * action = CCJumpTiles3D::create(2,

CCSize(4,4),20,20);

//CCShakyTiles3D * action = CCShakyTiles3D::create(2, CCSize(20,

20), 30, false);

//CCShatteredTiles3D * action = CCShatteredTiles3D::create(2,

CCSize(20,20),20,false);

//CCShuffleTiles * action = CCShuffleTiles::create(2,

CCSize(20,20),2);

//CCSplitCols * action = CCSplitCols::create(2, 20);

//CCSplitRows * action = CCSplitRows::create(2, 20);

//CCTurnOffTiles * action = CCTurnOffTiles::create(2,

CCSize(20,20));

CCWavesTiles3D * action = CCWavesTiles3D::create(2,

CCSize(20,20),20,30);

spr->runAction(action);

 

部落网格效果。从左下角到右下角

CCActionInterval* fadeOutTRTiles = CCFadeOutTRTiles::create(5, CCSize(50, 50));

sp->runAction(fadeOutTRTiles);

//參数1:特效持续的时间

//參数2:网格大小

#include "T18Grid3D.h"

#include "AppMacros.h"

 

CCScene *T18Grid3D::scene()

{

    CCScene * scene = CCScene::create();

    T18Grid3D * layer = T18Grid3D::create();

    scene->addChild(layer);

    return scene;

}

 

bool T18Grid3D::init()

{

    TBack::init();

   

    //Grid3D

    CCSprite * spr = CCSprite::create("HelloWorld.png");

    spr->setPosition(ccp(winSize.width / 2, winSize.height / 2));

    addChild(spr);

 

    CCFadeOutTRTiles * action = CCFadeOutTRTiles::create(

        20,

        CCSize(20, 20));

 

    spr->runAction(action);

 

    return true;

}

执行结果:

技术分享

跳动的方块特效

CCActionInterval* jumpTitles = CCJumpTitles3D::create(5,CCSize(20,20),5,20);

sp->runAction(jumpTiles);

作用:跳动的方格特效

參数1:特效持续的时间

參数2:网格的大小

參数3:跳动的次数

參数4:跳动的振幅

#include "T18Grid3D.h"

#include "AppMacros.h"

 

CCScene *T18Grid3D::scene()

{

    CCScene * scene = CCScene::create();

    T18Grid3D * layer = T18Grid3D::create();

    scene->addChild(layer);

    return scene;

}

 

bool T18Grid3D::init()

{

    TBack::init();

   

    //Grid3D

    CCSprite * spr = CCSprite::create("HelloWorld.png");

    spr->setPosition(ccp(winSize.width / 2, winSize.height / 2));

    addChild(spr);

 

    CCActionInterval* jumpTiles = CCJumpTiles3D::create(

        5,              //特效持续的时间

        CCSize(20,20),  //网格的大小

        5,              //跳动的次数

        20);            //跳动的振幅

 

    spr->runAction(jumpTiles);

 

    return true;

}

技术分享

3D 瓷砖晃动特效

CCActionInterval* shakyTiles3D = CCShakyTiles3D::create(5, CCSize(10, 10), 5, false);

sp->runAction(shakyTiles3D);

作用:创建一个3d瓷砖晃动的特效

參数1:特效持续的时间

參数2:网格大小

參数3:晃动的范围

參数5:是否有z轴晃动

#include "T18Grid3D.h"

#include "AppMacros.h"

 

CCScene *T18Grid3D::scene()

{

    CCScene * scene = CCScene::create();

    T18Grid3D * layer = T18Grid3D::create();

    scene->addChild(layer);

    return scene;

}

 

bool T18Grid3D::init()

{

    TBack::init();

   

    //Grid3D

    CCSprite * spr = CCSprite::create("HelloWorld.png");

    spr->setPosition(ccp(winSize.width / 2, winSize.height / 2));

    addChild(spr);

 

    CCActionInterval* shakyTiles3D = CCShakyTiles3D::create(

        5,                //特效持续的时间

        CCSize(10, 10),   //网格大小

        5,                //晃动的范围

        false);           //是否有z轴晃动

 

    spr->runAction(shakyTiles3D);

 

    return true;

}

执行结果:

技术分享

破碎的3D瓷砖特效 

CCActionInterval* shatteredTiles = CCShatteredTiles3D::create(15, CCSize(10, 10), 50, true); 

sp->runAction(shatteredTiles); 

作用:破碎的3D瓷砖特效

參数1:特效持续的时间

參数2:网格大小

參数3:范围

參数4:是否开启z

#include "T18Grid3D.h"

#include "AppMacros.h"

 

CCScene *T18Grid3D::scene()

{

    CCScene * scene = CCScene::create();

    T18Grid3D * layer = T18Grid3D::create();

    scene->addChild(layer);

    return scene;

}

 

bool T18Grid3D::init()

{

    TBack::init();

   

    //Grid3D

    CCSprite * spr = CCSprite::create("HelloWorld.png");

    spr->setPosition(ccp(winSize.width / 2, winSize.height / 2));

    addChild(spr);

 

    CCActionInterval* shatteredTiles = CCShatteredTiles3D::create(

        15,                  //特效持续的时间

        CCSize(10,10),       //网格大小

        50,                  //范围

        true);               //是否开启z

 

    spr->runAction(shatteredTiles);

 

    return true;

}

执行结果(特点是破碎的状态):

技术分享

瓷砖洗牌特效:

CCActionInterval* shuffle = CCShuffleTiles::create(5, CCSize(50, 50), 50);

作用:瓷砖的洗牌特效

參数1:特效持续的时间

參数2:网格大小

參数3:随机数

#include "T18Grid3D.h"

#include "AppMacros.h"

 

CCScene *T18Grid3D::scene()

{

    CCScene * scene = CCScene::create();

    T18Grid3D * layer = T18Grid3D::create();

    scene->addChild(layer);

    return scene;

}

 

bool T18Grid3D::init()

{

    TBack::init();

   

    //Grid3D

    CCSprite * spr = CCSprite::create("HelloWorld.png");

    spr->setPosition(ccp(winSize.width / 2, winSize.height / 2));

    addChild(spr);

 

    CCActionInterval * shuffle = CCShuffleTiles::create(

        5,                //特效的持续时间

        CCSize(50,50),    //网格的大小

        50);              //随机数

 

    spr->runAction(shuffle);

 

    return true;

}

执行效果:

技术分享

技术分享

分多行消失特效

CCActionInterval* splitCols = CCSplitCols::create(5,50);

sp->runAction(splitCols);

作用:分多列消失特效

參数1:特效持续的时间

參数2:列数

#include "T18Grid3D.h"

#include "AppMacros.h"

 

CCScene *T18Grid3D::scene()

{

    CCScene * scene = CCScene::create();

    T18Grid3D * layer = T18Grid3D::create();

    scene->addChild(layer);

    return scene;

}

 

bool T18Grid3D::init()

{

    TBack::init();

   

    //Grid3D

    CCSprite * spr = CCSprite::create("HelloWorld.png");

    spr->setPosition(ccp(winSize.width / 2, winSize.height / 2));

    addChild(spr);

 

    CCActionInterval * splitCols = CCSplitCols::create(5,20);

 

    spr->runAction(splitCols);

 

    return true;

}

执行效果:

技术分享

分多列消失特效 

CCActionInterval* splitRows = CCSplitRows::create(5, 50); 

sp->runAction(splitRows); 

 

作用:分多行消失特效

參数1:特效持续的时间

參数2:行数

#include "T18Grid3D.h"

#include "AppMacros.h"

 

CCScene *T18Grid3D::scene()

{

    CCScene * scene = CCScene::create();

    T18Grid3D * layer = T18Grid3D::create();

    scene->addChild(layer);

    return scene;

}

 

bool T18Grid3D::init()

{

    TBack::init();

   

    //Grid3D

    CCSprite * spr = CCSprite::create("HelloWorld.png");

    spr->setPosition(ccp(winSize.width / 2, winSize.height / 2));

    addChild(spr);

 

    CCActionInterval * splitRows = CCSplitRows::create(5, 50);

   

    spr->runAction(splitRows);

 

    return true;

}

执行结果:

技术分享

方块消失特效

CCActionInterval* turnOffFiels = CCTurnOffTiles::create(4, CCSize(50, 50));

sp->runAction(turnOffFiles);

作用:方块消失特效

參数1:特效持续的时间

參数2:网络大小

#include "T18Grid3D.h"

#include "AppMacros.h"

 

CCScene *T18Grid3D::scene()

{

    CCScene * scene = CCScene::create();

    T18Grid3D * layer = T18Grid3D::create();

    scene->addChild(layer);

    return scene;

}

 

bool T18Grid3D::init()

{

    TBack::init();

   

    //Grid3D

    CCSprite * spr = CCSprite::create("HelloWorld.png");

    spr->setPosition(ccp(winSize.width / 2, winSize.height / 2));

    addChild(spr);

 

    CCActionInterval * turnOffFiles = CCTurnOffTiles::create(

        4,                 //特效持续的时间

        CCSize(50,50));    //网格大小

 

    spr->runAction(turnOffFiles);

 

    return true;

}

执行结果(渐渐消失):

技术分享

技术分享

3D瓷砖波动特效

CCActionInterval * turnOffFiles = CCTurnOffTiles::create(

4,

CCSize(10,10),

10,

20);

作用:创建一个3D瓷砖波动特效

參数1:特效持续时间

參数2:网格大小

參数3:波动的速率

參数4:振幅

#include "T18Grid3D.h"

#include "AppMacros.h"

 

CCScene *T18Grid3D::scene()

{

    CCScene * scene = CCScene::create();

    T18Grid3D * layer = T18Grid3D::create();

    scene->addChild(layer);

    return scene;

}

 

bool T18Grid3D::init()

{

    TBack::init();

   

    //Grid3D

    CCSprite * spr = CCSprite::create("HelloWorld.png");

    spr->setPosition(ccp(winSize.width / 2, winSize.height / 2));

    addChild(spr);

 

    //3D瓷砖波动特效

    CCActionInterval* wavesTiles3D = CCWavesTiles3D::create(

        5,               //特效持续时间

        CCSize(10, 10),  //网格大小

        10,              //波动的速率

        20);             //振幅

 

    spr->runAction(wavesTiles3D);

 

    return true;

}

执行结果:

技术分享

技术分享

 

以上是关于3.CCFadeOutTRTiles,部落格效果,跳动的方块特效,3D瓷砖晃动特效,破碎的3D瓷砖特效,瓷砖洗牌特效,分多行消失特效,分多列消失特效的主要内容,如果未能解决你的问题,请参考以下文章

QQ兴趣部落 大批量引流实战技巧

新人报到 初入思否

部落冲突联赛额外奖励规则

Git分支的创建以及分支冲突解决

部落冲突豌豆荚为啥不能安装

热榜!! 基于java springboot实现博客系统《建议收藏》