zoukankan      html  css  js  c++  java
  • cocos2d-x之Action特效

    bool HelloWorld::init()

    {

        if ( !Layer::init() )

        {

            return false;

        }

        

        Size visibleSize = Director::getInstance()->getVisibleSize();

        Vec2 origin = Director::getInstance()->getVisibleOrigin();

        

        auto role=NodeGrid::create();

        role->addChild(Sprite::create("fen.png"));

        role->setPosition(visibleSize/2);

        addChild(role);

        

        //role->runAction(Shaky3D::create(10,Size(50,50),5,false));

        //role->runAction(ShakyTiles3D::create(10,Size(50,50),5,false));

        //role->runAction(ShuffleTiles::create(1,Size(50,50),5));

        

        //auto shaky=ShakyTiles3D::create(1,Size(50,50),5,false);

        //auto shuffle=ShuffleTiles::create(0.5,Size(50,50),25);

        

        //role->runAction(Sequence::create(shaky,shuffle,NULL));

        

        //role->runAction(TurnOffTiles::create(1,Size(50,50),25));

        

        //role->runAction(Waves3D::create(2,Size(15,10),5,40));

        

        auto w1=Waves3D::create(2,Size(15,10),5,40);

        auto w2=Waves3D::create(2,Size(15,10),5,0);

        role->runAction(Sequence::create(w1,w2,NULL));

        

        return true;

    }

  • 相关阅读:
    [LeetCode 题解]: Triangle
    [LeetCode 题解]: pow(x,n)
    [LeetCode 题解]: plusOne
    [LeetCode 题解]: ZigZag Conversion
    error: field 'b' has imcomplete type
    两个分数的最小公倍数
    DDR工作原理
    流水线技术原理和Verilog HDL实现
    FPGA主要应用
    提高器件工作的速度
  • 原文地址:https://www.cnblogs.com/daochong/p/5227829.html
Copyright © 2011-2022 走看看