Exemplo n.º 1
0
        public static CCWaves3D actionWithWaves(int wav, float amp, ccGridSize gridSize, float duration)
        {
            CCWaves3D cCWaves3D = new CCWaves3D();

            if (cCWaves3D.initWithWaves(wav, amp, gridSize, duration))
            {
                return(cCWaves3D);
            }
            return(null);
        }
Exemplo n.º 2
0
        /// <summary>
        /// create the action
        /// </summary>
        public static CCWaves3D actionWithWaves(int wav, float amp, ccGridSize gridSize, float duration)
        {
            CCWaves3D pAction = new CCWaves3D();

            if (pAction.initWithWaves(wav, amp, gridSize, duration))
            {
                return pAction;
            }

            return null;
        }
Exemplo n.º 3
0
        public override CCObject copyWithZone(CCZone pZone)
        {
            CCWaves3D cCWaves3D = null;

            if (pZone == null || pZone.m_pCopyObject == null)
            {
                cCWaves3D = new CCWaves3D();
                pZone     = new CCZone(cCWaves3D);
            }
            else
            {
                cCWaves3D = (CCWaves3D)pZone.m_pCopyObject;
            }
            this.copyWithZone(pZone);
            cCWaves3D.initWithWaves(this.m_nWaves, this.m_fAmplitude, this.m_sGridSize, this.m_fDuration);
            return(cCWaves3D);
        }
Exemplo n.º 4
0
        /** create the action */
        public static CCWaves3D actionWithWaves(int wav, float amp, ccGridSize gridSize, float duration)
        {
            CCWaves3D pAction = new CCWaves3D();

            if (pAction != null)
            {
                if (pAction.initWithWaves(wav, amp, gridSize, duration))
                {
                    //pAction.autorelease();
                }
                else
                {
                    //CC_SAFE_RELEASE_NULL(pAction);
                }
            }

            return pAction;
        }
Exemplo n.º 5
0
        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;
        }
Exemplo n.º 6
0
        public override CCObject copyWithZone(CCZone pZone)
        {
            CCZone pNewZone = null;
            CCWaves3D pCopy = null;
            if (pZone != null && pZone.m_pCopyObject != null)
            {
                //in case of being called at sub class
                pCopy = (CCWaves3D)(pZone.m_pCopyObject);
            }
            else
            {
                pCopy = new CCWaves3D();
                pZone = pNewZone = new CCZone(pCopy);
            }

            copyWithZone(pZone);
            
            pCopy.initWithWaves(m_nWaves, m_fAmplitude, m_sGridSize, m_fDuration);

            return pCopy;
        }
Exemplo n.º 7
0
        public override CCObject copyWithZone(CCZone pZone)
        {
            CCZone    pNewZone = null;
            CCWaves3D pCopy    = null;

            if (pZone != null && pZone.m_pCopyObject != null)
            {
                //in case of being called at sub class
                pCopy = (CCWaves3D)(pZone.m_pCopyObject);
            }
            else
            {
                pCopy = new CCWaves3D();
                pZone = pNewZone = new CCZone(pCopy);
            }

            copyWithZone(pZone);

            pCopy.initWithWaves(m_nWaves, m_fAmplitude, m_sGridSize, Duration);

            return(pCopy);
        }
Exemplo n.º 8
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:
            //     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(new CCPoint(size.Width / 2, size.Height / 2), 240, new CCGridSize(15, 10), 0.0f);
            CCActionInterval waves = new CCWaves3D(18, 15, new CCGridSize(15, 10), 10);

            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 ((CCSequence.FromActions(orbit, orbit_back))));
            target.RunAction(CCSequence.FromActions(lens, delay, reuse, waves));
        }
Exemplo n.º 9
0
 public static CCWaves3D Create(int wav, float amp, CCGridSize gridSize, float duration)
 {
     var pAction = new CCWaves3D();
     pAction.InitWithWaves(wav, amp, gridSize, duration);
     return pAction;
 }