Пример #1
0
        public override void onEnter()
        {
            base.onEnter();
            CCSize winSize = CCDirector.sharedDirector().getWinSize();

            this.m_pInScene.scale        = 0.5f;
            this.m_pInScene.position     = new CCPoint(winSize.width, 0f);
            this.m_pInScene.anchorPoint  = new CCPoint(0.5f, 0.5f);
            this.m_pOutScene.anchorPoint = new CCPoint(0.5f, 0.5f);
            CCActionInterval cCActionInterval  = CCJumpBy.actionWithDuration(this.m_fDuration / 4f, new CCPoint(-winSize.width, 0f), winSize.width / 4f, 2);
            CCActionInterval cCActionInterval1 = CCScaleTo.actionWithDuration(this.m_fDuration / 4f, 1f);
            CCActionInterval cCActionInterval2 = CCScaleTo.actionWithDuration(this.m_fDuration / 4f, 0.5f);

            CCFiniteTimeAction[] cCFiniteTimeActionArray = new CCFiniteTimeAction[] { cCActionInterval2, cCActionInterval };
            CCActionInterval     cCActionInterval3       = (CCActionInterval)CCSequence.actions(cCFiniteTimeActionArray);

            CCFiniteTimeAction[] cCFiniteTimeActionArray1 = new CCFiniteTimeAction[] { cCActionInterval, cCActionInterval1 };
            CCActionInterval     cCActionInterval4        = (CCActionInterval)CCSequence.actions(cCFiniteTimeActionArray1);
            CCActionInterval     cCActionInterval5        = CCDelayTime.actionWithDuration(this.m_fDuration / 2f);

            this.m_pOutScene.runAction(cCActionInterval3);
            CCScene mPInScene = this.m_pInScene;

            CCFiniteTimeAction[] cCFiniteTimeActionArray2 = new CCFiniteTimeAction[] { cCActionInterval5, cCActionInterval4, CCCallFunc.actionWithTarget(this, new SEL_CallFunc(this.finish)) };
            mPInScene.runAction(CCSequence.actions(cCFiniteTimeActionArray2));
        }
Пример #2
0
        public bool initOneTwo(CCFiniteTimeAction action1, CCFiniteTimeAction action2)
        {
            Debug.Assert(action1 != null);
            Debug.Assert(action2 != null);

            bool bRet = false;

            float d1 = action1.duration;
            float d2 = action2.duration;

            if (base.initWithDuration(Math.Max(d1, d2)))
            {
                m_pOne = action1;
                m_pTwo = action2;

                if (d1 > d2)
                {
                    m_pTwo = CCSequence.actionOneTwo(action2, CCDelayTime.actionWithDuration(d1 - d2));
                }
                else if (d1 < d2)
                {
                    m_pOne = CCSequence.actionOneTwo(action1, CCDelayTime.actionWithDuration(d2 - d1));
                }

                bRet = true;
            }

            return(bRet);
        }
Пример #3
0
        public override void onEnter()
        {
            base.onEnter();
            CCSize s = CCDirector.sharedDirector().getWinSize();

            m_pInScene.scale        = 0.5f;
            m_pInScene.position     = new CCPoint(s.width, 0);
            m_pInScene.anchorPoint  = new CCPoint(0.5f, 0.5f);
            m_pOutScene.anchorPoint = new CCPoint(0.5f, 0.5f);

            CCActionInterval jump     = CCJumpBy.actionWithDuration(m_fDuration / 4, new CCPoint(-s.width, 0), s.width / 4, 2);
            CCActionInterval scaleIn  = CCScaleTo.actionWithDuration(m_fDuration / 4, 1.0f);
            CCActionInterval scaleOut = CCScaleTo.actionWithDuration(m_fDuration / 4, 0.5f);

            CCActionInterval jumpZoomOut = (CCActionInterval)(CCSequence.actions(scaleOut, jump));
            CCActionInterval jumpZoomIn  = (CCActionInterval)(CCSequence.actions(jump, scaleIn));

            CCActionInterval delay = CCDelayTime.actionWithDuration(m_fDuration / 2);

            m_pOutScene.runAction(jumpZoomOut);
            m_pInScene.runAction
            (
                CCSequence.actions
                (
                    delay,
                    jumpZoomIn,
                    CCCallFunc.actionWithTarget(this, base.finish)
                )
            );
        }
Пример #4
0
        public override void onEnter()
        {
            base.onEnter();

            m_pInScene.Scale  = 0.001f;
            m_pOutScene.Scale = 1.0f;

            m_pInScene.AnchorPoint  = new CCPoint(0.5f, 0.5f);
            m_pOutScene.AnchorPoint = new CCPoint(0.5f, 0.5f);

            CCActionInterval rotozoom = (CCActionInterval)(CCSequence.actions
                                                           (
                                                               CCSpawn.actions
                                                               (
                                                                   CCScaleBy.actionWithDuration(m_fDuration / 2, 0.001f),
                                                                   CCRotateBy.actionWithDuration(m_fDuration / 2, 360 * 2)
                                                               ),
                                                               CCDelayTime.actionWithDuration(m_fDuration / 2)
                                                           ));

            m_pOutScene.RunAction(rotozoom);
            m_pInScene.RunAction
            (
                CCSequence.actions
                (
                    rotozoom.Reverse(),
                    CCCallFunc.actionWithTarget(this, (base.finish))
                )
            );
        }
Пример #5
0
        public override void onEnter()
        {
            base.onEnter();

            CCActionInterval inA, outA;

            m_pInScene.Visible = false;

            float inDeltaZ, inAngleZ;
            float outDeltaZ, outAngleZ;

            if (m_eOrientation == tOrientation.kOrientationUpOver)
            {
                inDeltaZ  = 90;
                inAngleZ  = 270;
                outDeltaZ = 90;
                outAngleZ = 0;
            }
            else
            {
                inDeltaZ  = -90;
                inAngleZ  = 90;
                outDeltaZ = -90;
                outAngleZ = 0;
            }

            inA = (CCActionInterval)CCSequence.actions
                  (
                CCDelayTime.actionWithDuration(m_fDuration / 2),
                CCSpawn.actions
                (
                    new CCOrbitCamera(m_fDuration / 2, 1, 0, inAngleZ, inDeltaZ, 90, 0),
                    CCScaleTo.actionWithDuration(m_fDuration / 2, 1),
                    CCShow.action()
                ),
                CCCallFunc.actionWithTarget(this, base.finish)
                  );

            outA = (CCActionInterval)CCSequence.actions
                   (
                CCSpawn.actions
                (
                    new CCOrbitCamera(m_fDuration / 2, 1, 0, outAngleZ, outDeltaZ, 90, 0),
                    CCScaleTo.actionWithDuration(m_fDuration / 2, 0.5f)
                ),
                CCHide.action(),
                CCDelayTime.actionWithDuration(m_fDuration / 2)
                   );

            m_pInScene.Scale = 0.5f;
            m_pInScene.RunAction(inA);
            m_pOutScene.RunAction(outA);
        }
Пример #6
0
        public override void onEnter()
        {
            base.onEnter();
            this.m_pInScene.scale        = 0.001f;
            this.m_pOutScene.scale       = 1f;
            this.m_pInScene.anchorPoint  = new CCPoint(0.5f, 0.5f);
            this.m_pOutScene.anchorPoint = new CCPoint(0.5f, 0.5f);
            CCFiniteTimeAction[] cCFiniteTimeActionArray  = new CCFiniteTimeAction[2];
            CCFiniteTimeAction[] cCFiniteTimeActionArray1 = new CCFiniteTimeAction[] { CCScaleBy.actionWithDuration(this.m_fDuration / 2f, 0.001f), CCRotateBy.actionWithDuration(this.m_fDuration / 2f, 720f) };
            cCFiniteTimeActionArray[0] = CCSpawn.actions(cCFiniteTimeActionArray1);
            cCFiniteTimeActionArray[1] = CCDelayTime.actionWithDuration(this.m_fDuration / 2f);
            CCActionInterval cCActionInterval = (CCActionInterval)CCSequence.actions(cCFiniteTimeActionArray);

            this.m_pOutScene.runAction(cCActionInterval);
            CCScene mPInScene = this.m_pInScene;

            CCFiniteTimeAction[] cCFiniteTimeActionArray2 = new CCFiniteTimeAction[] { cCActionInterval.reverse(), CCCallFunc.actionWithTarget(this, new SEL_CallFunc(this.finish)) };
            mPInScene.runAction(CCSequence.actions(cCFiniteTimeActionArray2));
        }
Пример #7
0
        public override void onEnter()
        {
            float single;
            float single1;
            float single2;
            float single3;

            base.onEnter();
            this.m_pInScene.visible = false;
            if (this.m_eOrientation != tOrientation.kOrientationRightOver)
            {
                single  = -90f;
                single1 = 90f;
                single2 = -90f;
                single3 = 0f;
            }
            else
            {
                single  = 90f;
                single1 = 270f;
                single2 = 90f;
                single3 = 0f;
            }
            CCFiniteTimeAction[] cCFiniteTimeActionArray  = new CCFiniteTimeAction[] { CCDelayTime.actionWithDuration(this.m_fDuration / 2f), null, null, null };
            CCFiniteTimeAction[] cCFiniteTimeActionArray1 = new CCFiniteTimeAction[] { CCOrbitCamera.actionWithDuration(this.m_fDuration / 2f, 1f, 0f, single1, single, -45f, 0f), CCScaleTo.actionWithDuration(this.m_fDuration / 2f, 1f), CCShow.action() };
            cCFiniteTimeActionArray[1] = CCSpawn.actions(cCFiniteTimeActionArray1);
            cCFiniteTimeActionArray[2] = CCShow.action();
            cCFiniteTimeActionArray[3] = CCCallFunc.actionWithTarget(this, new SEL_CallFunc(this.finish));
            CCActionInterval cCActionInterval = (CCActionInterval)CCSequence.actions(cCFiniteTimeActionArray);

            CCFiniteTimeAction[] cCFiniteTimeActionArray2 = new CCFiniteTimeAction[3];
            CCFiniteTimeAction[] cCFiniteTimeActionArray3 = new CCFiniteTimeAction[] { CCOrbitCamera.actionWithDuration(this.m_fDuration / 2f, 1f, 0f, single3, single2, 45f, 0f), CCScaleTo.actionWithDuration(this.m_fDuration / 2f, 0.5f) };
            cCFiniteTimeActionArray2[0] = CCSpawn.actions(cCFiniteTimeActionArray3);
            cCFiniteTimeActionArray2[1] = CCHide.action();
            cCFiniteTimeActionArray2[2] = CCDelayTime.actionWithDuration(this.m_fDuration / 2f);
            CCActionInterval cCActionInterval1 = (CCActionInterval)CCSequence.actions(cCFiniteTimeActionArray2);

            this.m_pInScene.scale = 0.5f;
            this.m_pInScene.runAction(cCActionInterval);
            this.m_pOutScene.runAction(cCActionInterval1);
        }
Пример #8
0
        public bool initOneTwo(CCFiniteTimeAction action1, CCFiniteTimeAction action2)
        {
            bool  flag    = false;
            float single  = action1.duration;
            float single1 = action2.duration;

            if (base.initWithDuration(Math.Max(single, single1)))
            {
                this.m_pOne = action1;
                this.m_pTwo = action2;
                if (single > single1)
                {
                    this.m_pTwo = CCSequence.actionOneTwo(action2, CCDelayTime.actionWithDuration(single - single1));
                }
                else if (single < single1)
                {
                    this.m_pOne = CCSequence.actionOneTwo(action1, CCDelayTime.actionWithDuration(single1 - single));
                }
                flag = true;
            }
            return(flag);
        }
Пример #9
0
 public override CCFiniteTimeAction reverse()
 {
     return(CCDelayTime.actionWithDuration(this.m_fDuration));
 }
Пример #10
0
        public override void onEnter()
        {
            float single;
            float single1;
            float single2;
            float single3;

            base.onEnter();
            this.m_pInScene.visible = false;
            if (this.m_eOrientation != tOrientation.kOrientationLeftOver)
            {
                single  = -90f;
                single1 = 90f;
                single2 = -90f;
                single3 = 0f;
            }
            else
            {
                single  = 90f;
                single1 = 270f;
                single2 = 90f;
                single3 = 0f;
            }
            CCFiniteTimeAction[] cCFiniteTimeActionArray = new CCFiniteTimeAction[] { CCDelayTime.actionWithDuration(this.m_fDuration / 2f), CCShow.action(), CCOrbitCamera.actionWithDuration(this.m_fDuration / 2f, 1f, 0f, single1, single, 90f, 0f), CCCallFunc.actionWithTarget(this, new SEL_CallFunc(this.finish)) };
            CCActionInterval     cCActionInterval        = (CCActionInterval)CCSequence.actions(cCFiniteTimeActionArray);

            CCFiniteTimeAction[] cCFiniteTimeActionArray1 = new CCFiniteTimeAction[] { CCOrbitCamera.actionWithDuration(this.m_fDuration / 2f, 1f, 0f, single3, single2, 90f, 0f), CCHide.action(), CCDelayTime.actionWithDuration(this.m_fDuration / 2f) };
            CCActionInterval     cCActionInterval1        = (CCActionInterval)CCSequence.actions(cCFiniteTimeActionArray1);

            this.m_pInScene.runAction(cCActionInterval);
            this.m_pOutScene.runAction(cCActionInterval1);
        }