Пример #1
0
        public static CCWaves actionWithWaves(int wav, float amp, bool h, bool v, ccGridSize gridSize, float duration)
        {
            CCWaves cCWafe = new CCWaves();

            if (cCWafe.initWithWaves(wav, amp, h, v, gridSize, duration))
            {
                return(cCWafe);
            }
            return(null);
        }
Пример #2
0
        /// <summary>
        /// initializes the action with amplitude, horizontal sin, vertical sin, a grid and duration
        /// </summary>
        public static CCWaves actionWithWaves(int wav, float amp, bool h, bool v, ccGridSize gridSize,
            float duration)
        {
            CCWaves pAction = new CCWaves();

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

            return null;
        }
Пример #3
0
        public override CCObject copyWithZone(CCZone pZone)
        {
            CCWaves cCWafe = null;

            if (pZone == null || pZone.m_pCopyObject == null)
            {
                cCWafe = new CCWaves();
                pZone  = new CCZone(cCWafe);
            }
            else
            {
                cCWafe = (CCWaves)pZone.m_pCopyObject;
            }
            base.copyWithZone(pZone);
            cCWafe.initWithWaves(this.m_nWaves, this.m_fAmplitude, this.m_bHorizontal, this.m_bVertical, this.m_sGridSize, this.m_fDuration);
            return(cCWafe);
        }
Пример #4
0
        public override void OnEnter()
        {
            base.OnEnter();

            CCNode bg = GetChildByTag(EffectAdvanceScene.kTagBackground);
            CCNode target1 = bg.GetChildByTag(EffectAdvanceScene.kTagSprite1);
            CCNode target2 = bg.GetChildByTag(EffectAdvanceScene.kTagSprite2);

            CCActionInterval waves = new CCWaves(5, 20, true, false, new CCGridSize(15, 10), 5);
            CCActionInterval shaky = new CCShaky3D(4, false, new CCGridSize(15, 10), 5);

            target1.RunAction(new CCRepeatForever (waves));
            target2.RunAction(new CCRepeatForever (shaky));

            // moving background. Testing issue #244
            CCActionInterval move = new CCMoveBy (3, new CCPoint(200, 0));
            bg.RunAction(new CCRepeatForever (CCSequence.FromActions(move, move.Reverse())));
        }
Пример #5
0
        /** initializes the action with amplitude, horizontal sin, vertical sin, a grid and duration */
        public static CCWaves actionWithWaves(int wav, float amp, bool h, bool v, ccGridSize gridSize,
            float duration)
        {
            CCWaves pAction = new CCWaves();

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

            return pAction;
        }
Пример #6
0
        public override object Copy(ICopyable pZone)
        {
            CCWaves pCopy;
            if (pZone != null)
            {
                //in case of being called at sub class
                pCopy = (CCWaves) (pZone);
            }
            else
            {
                pCopy = new CCWaves();
                pZone =  (pCopy);
            }

            base.Copy(pZone);

            pCopy.InitWithWaves(m_nWaves, m_fAmplitude, m_bHorizontal, m_bVertical, m_sGridSize, m_fDuration);

            return pCopy;
        }
Пример #7
0
        public override CCObject copyWithZone(CCZone pZone)
        {
            CCZone pNewZone = null;
            CCWaves pCopy = null;
            if (pZone != null && pZone.m_pCopyObject != null)
            {
                //in case of being called at sub class
                pCopy = (CCWaves)(pZone.m_pCopyObject);
            }
            else
            {
                pCopy = new CCWaves();
                pZone = pNewZone = new CCZone(pCopy);
            }

            base.copyWithZone(pZone);

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

            return pCopy;
        }
Пример #8
0
        public override CCObject copyWithZone(CCZone pZone)
        {
            CCZone  pNewZone = null;
            CCWaves pCopy    = null;

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

            base.copyWithZone(pZone);

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

            return(pCopy);
        }
Пример #9
0
 public static CCWaves Create(int wav, float amp, bool h, bool v, CCGridSize gridSize, float duration)
 {
     var pAction = new CCWaves();
     pAction.InitWithWaves(wav, amp, h, v, gridSize, duration);
     return pAction;
 }