Beispiel #1
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, new CCGridSize(15, 10), 5, 20, true, false);
            CCActionInterval shaky = new CCShaky3D(5, new CCGridSize(15, 10), 4, false);

            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 (new CCSequence(move, move.Reverse())));
        }
Beispiel #2
0
        public override object Copy(ICCCopyable 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.InitWithDuration(m_fDuration, m_sGridSize, m_nWaves, m_fAmplitude, m_bHorizontal, m_bVertical);

            return pCopy;
        }
Beispiel #3
0
        public override object Copy(ICCCopyable 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.InitWithDuration(m_fDuration, m_sGridSize, m_nWaves, m_fAmplitude, m_bHorizontal, m_bVertical);

            return(pCopy);
        }