Exemplo n.º 1
0
        public override void onEnter()
        {
            base.onEnter();

            CCNode target = getChildByTag(EffectAdvanceScene.kTagBackground);

            // To reuse a grid the grid size and the grid type must be the same.
            // in this case:
            //     ShakyTiles is TiledGrid3D and it's size is (15,10)
            //     Shuffletiles is TiledGrid3D and it's size is (15,10)
            //	   TurnOfftiles is TiledGrid3D and it's size is (15,10)
            CCActionInterval   shaky   = CCShakyTiles3D.actionWithRange(4, false, new ccGridSize(15, 10), 5);
            CCActionInterval   shuffle = CCShuffleTiles.actionWithSeed(0, new ccGridSize(15, 10), 3);
            CCActionInterval   turnoff = CCTurnOffTiles.actionWithSeed(0, new ccGridSize(15, 10), 3);
            CCFiniteTimeAction turnon  = turnoff.reverse();

            // reuse 2 times:
            //   1 for shuffle
            //   2 for turn off
            //   turnon tiles will use a new grid
            CCFiniteTimeAction reuse = CCReuseGrid.actionWithTimes(2);

            CCActionInterval delay = CCDelayTime.actionWithDuration(1);

            //	id orbit = [OrbitCamera::actionWithDuration:5 radius:1 deltaRadius:2 angleZ:0 deltaAngleZ:180 angleX:0 deltaAngleX:-90];
            //	id orbit_back = [orbit reverse];
            //
            //	[target runAction: [RepeatForever::actionWithAction: [Sequence actions: orbit, orbit_back, nil]]];
            target.runAction((CCActionInterval)(CCSequence.actions(shaky, delay, reuse, shuffle, delay, turnoff, turnon)));
        }
Exemplo n.º 2
0
        public new static CCActionInterval actionWithDuration(float t)
        {
            CCShuffleTiles     shuffle      = CCShuffleTiles.actionWithSeed(25, new ccGridSize(16, 12), t);
            CCFiniteTimeAction shuffle_back = shuffle.reverse();
            CCDelayTime        delay        = CCDelayTime.actionWithDuration(2);

            return((CCActionInterval)(CCSequence.actions(shuffle, delay, shuffle_back)));
        }