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: // Lens3D is Grid3D and it's size is (15,10) // Waves3D is Grid3D and it's size is (15,10) CCSize size = CCDirector.SharedDirector.WinSize; CCActionInterval lens = new CCLens3D(0.0f, new CCGridSize(15, 10), new CCPoint(size.Width / 2, size.Height / 2), 240); CCActionInterval waves = new CCWaves3D(10, new CCGridSize(15, 10), 18, 15); CCFiniteTimeAction reuse = new CCReuseGrid(1); CCActionInterval delay = new CCDelayTime (8); CCActionInterval orbit = new CCOrbitCamera(5, 1, 2, 0, 180, 0, -90); CCFiniteTimeAction orbit_back = orbit.Reverse(); target.RunAction(new CCRepeatForever ((new CCSequence(orbit, orbit_back)))); target.RunAction(new CCSequence(lens, delay, reuse, waves)); }
public override object Copy(ICCCopyable pZone) { CCWaves3D pCopy; if (pZone != null) { //in case of being called at sub class pCopy = (CCWaves3D) (pZone); } else { pCopy = new CCWaves3D(); pZone = (pCopy); } base.Copy(pZone); pCopy.InitWithWaves(m_fDuration, m_sGridSize, m_nWaves, m_fAmplitude); return pCopy; }
public override object Copy(ICopyable pZone) { CCWaves3D pCopy; if (pZone != null) { //in case of being called at sub class pCopy = (CCWaves3D)(pZone); } else { pCopy = new CCWaves3D(); pZone = (pCopy); } base.Copy(pZone); pCopy.InitWithWaves(m_nWaves, m_fAmplitude, m_sGridSize, m_fDuration); return(pCopy); }