コード例 #1
0
ファイル: Effect2.cs プロジェクト: Karunp/cocos2d-xna
        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 = new CCShakyTiles3D(5, new CCGridSize(15, 10), 4, false);
            CCActionInterval shuffle = new CCShuffleTiles(new CCGridSize(15, 10), 3, 0);
            CCActionInterval turnoff = new CCTurnOffTiles(3, new CCGridSize(15, 10), 0);
            CCFiniteTimeAction turnon = turnoff.Reverse();

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

            CCActionInterval delay = new CCDelayTime (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((new CCSequence(shaky, delay, reuse, shuffle, (CCFiniteTimeAction) delay.Copy(), turnoff, turnon)));
        }
コード例 #2
0
        public new static CCActionInterval actionWithDuration(float t)
        {
            CCShuffleTiles shuffle = new CCShuffleTiles(new CCGridSize(16, 12), t, 25);
            CCFiniteTimeAction shuffle_back = shuffle.Reverse();
            CCDelayTime delay = new CCDelayTime (2);

            return (CCActionInterval)(new CCSequence(shuffle, delay, shuffle_back));
        }