Пример #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   = new CCShakyTiles3D(4, false, new CCGridSize(15, 10), 5);
            CCActionInterval   shuffle = new CCShuffleTiles(0, new CCGridSize(15, 10), 3);
            CCActionInterval   turnoff = new CCTurnOffTiles(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 = 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((CCSequence.FromActions(shaky, delay, reuse, shuffle, (CCFiniteTimeAction)delay.Copy(), turnoff, turnon)));
        }
Пример #2
0
        public override void OnEnter()
        {
            base.OnEnter();

            // 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)
            var shaky   = new CCShakyTiles3D(5, new CCGridSize(15, 10), 4, false);
            var shuffle = new CCShuffleTiles(new CCGridSize(15, 10), 3, 0);
            var turnoff = new CCTurnOffTiles(3, new CCGridSize(15, 10), 0);
            var turnon  = turnoff.Reverse();

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

            var 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]]];
            bgNode.RunActions(shaky, delay, reuse, shuffle, delay, turnoff, turnon);
        }
Пример #3
0
        public override object Copy(ICopyable pZone)
        {
            CCShakyTiles3D pCopy;
            if (pZone != null)
            {
                //in case of being called at sub class
                pCopy = (CCShakyTiles3D) (pZone);
            }
            else
            {
                pCopy = new CCShakyTiles3D();
                pZone =  (pCopy);
            }

            base.Copy(pZone);

            pCopy.InitWithRange(m_nRandrange, m_bShakeZ, m_sGridSize, m_fDuration);

            return pCopy;
        }
Пример #4
0
        public override object Copy(ICCCopyable pZone)
        {
            CCShakyTiles3D pCopy;

            if (pZone != null)
            {
                //in case of being called at sub class
                pCopy = (CCShakyTiles3D)(pZone);
            }
            else
            {
                pCopy = new CCShakyTiles3D();
                pZone = (pCopy);
            }

            base.Copy(pZone);

            pCopy.InitWithDuration(m_fDuration, m_sGridSize, m_nRandrange, m_bShakeZ);

            return(pCopy);
        }
Пример #5
0
 /// <summary>
 /// creates the action with a range, whether or not to shake Z vertices, a grid size, and duration
 /// </summary>
 public static CCShakyTiles3D Create(int nRange, bool bShakeZ, CCGridSize gridSize, float duration)
 {
     var pAction = new CCShakyTiles3D();
     pAction.InitWithRange(nRange, bShakeZ, gridSize, duration);
     return pAction;
 }
Пример #6
0
 public new static CCActionInterval actionWithDuration(float t)
 {
     return(CCShakyTiles3D.actionWithRange(5, true, new ccGridSize(16, 12), t));
 }
Пример #7
0
 public CCShakyTiles3DState (CCShakyTiles3D action, CCNode target) : base (action, target)
 {
     ShakeZ = action.ShakeZ;
     Range = action.Range;
 }
Пример #8
0
 public CCShakyTiles3DState(CCShakyTiles3D action, CCNode target) : base(action, target)
 {
     ShakeZ = action.ShakeZ;
     Range  = action.Range;
 }