Пример #1
0
        public static CCShaky3D actionWithRange(int range, bool shakeZ, ccGridSize gridSize, float duration)
        {
            CCShaky3D cCShaky3D = new CCShaky3D();

            if (cCShaky3D.initWithRange(range, shakeZ, gridSize, duration))
            {
                return(cCShaky3D);
            }
            return(null);
        }
Пример #2
0
        /// <summary>
        /// creates the action with a range, shake Z vertices, a grid and duration
        /// </summary>
        public static CCShaky3D actionWithRange(int range, bool shakeZ, ccGridSize gridSize, float duration)
        {
            CCShaky3D pAction = new CCShaky3D();

            if (pAction.initWithRange(range, shakeZ, gridSize, duration))
            {
                return pAction;
            }

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

            if (pZone == null || pZone.m_pCopyObject == null)
            {
                cCShaky3D = new CCShaky3D();
                pZone     = new CCZone(cCShaky3D);
            }
            else
            {
                cCShaky3D = (CCShaky3D)pZone.m_pCopyObject;
            }
            base.copyWithZone(pZone);
            cCShaky3D.initWithRange(this.m_nRandrange, this.m_bShakeZ, this.m_sGridSize, this.m_fDuration);
            return(cCShaky3D);
        }
Пример #4
0
        /** creates the action with a range, shake Z vertices, a grid and duration */
        public static CCShaky3D actionWithRange(int range, bool shakeZ, ccGridSize gridSize, float duration)
        {
            CCShaky3D pAction = new CCShaky3D();

            if (pAction != null)
            {
                if (pAction.initWithRange(range, shakeZ, gridSize, duration))
                {
                    // pAction->autorelease();
                }
                else
                {
                    // CC_SAFE_RELEASE_NULL(pAction);
                }
            }

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

            base.copyWithZone(pZone);

            pCopy.initWithRange(m_nRandrange, m_bShakeZ, m_sGridSize, m_fDuration);
            return pCopy;
        }
Пример #7
0
        public override CCObject copyWithZone(CCZone pZone)
        {
            CCZone    pNewZone = null;
            CCShaky3D pCopy    = null;

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

            base.copyWithZone(pZone);

            pCopy.initWithRange(m_nRandrange, m_bShakeZ, m_sGridSize, Duration);
            return(pCopy);
        }