Exemple #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));
        }
Exemple #2
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)
                )
            );
        }
        public Atlas4()
        {
            m_time = 0;

            // Upper Label
            CCLabelBMFont label = CCLabelBMFont.labelWithString("Bitmap Font Atlas", "fonts/bitmapFontTest.fnt");

            addChild(label);

            CCSize s = CCDirector.sharedDirector().getWinSize();

            label.position    = new CCPoint(s.width / 2, s.height / 2);
            label.anchorPoint = new CCPoint(0.5f, 0.5f);


            CCSprite BChar = (CCSprite)label.getChildByTag(1);
            CCSprite FChar = (CCSprite)label.getChildByTag(7);
            CCSprite AChar = (CCSprite)label.getChildByTag(12);


            CCActionInterval rotate    = CCRotateBy.actionWithDuration(2, 360);
            CCAction         rot_4ever = CCRepeatForever.actionWithAction(rotate);

            CCActionInterval scale = CCScaleBy.actionWithDuration(2, 1.5f);
            //CCActionInterval scale_back = scale.reverse();
            CCActionInterval   scale_back  = null;
            CCFiniteTimeAction scale_seq   = CCSequence.actions(scale, scale_back, null);
            CCAction           scale_4ever = CCRepeatForever.actionWithAction((CCActionInterval)scale_seq);

            CCActionInterval jump       = CCJumpBy.actionWithDuration(0.5f, new CCPoint(), 60, 1);
            CCAction         jump_4ever = CCRepeatForever.actionWithAction(jump);

            CCActionInterval   fade_out   = CCFadeOut.actionWithDuration(1);
            CCActionInterval   fade_in    = CCFadeIn.actionWithDuration(1);
            CCFiniteTimeAction seq        = CCSequence.actions(fade_out, fade_in, null);
            CCAction           fade_4ever = CCRepeatForever.actionWithAction((CCActionInterval)seq);

            BChar.runAction(rot_4ever);
            BChar.runAction(scale_4ever);
            FChar.runAction(jump_4ever);
            AChar.runAction(fade_4ever);


            // Bottom Label
            CCLabelBMFont label2 = CCLabelBMFont.labelWithString("00.0", "fonts/bitmapFontTest.fnt");

            addChild(label2, 0, (int)TagSprite.kTagBitmapAtlas2);
            label2.position = new CCPoint(s.width / 2.0f, 80);

            CCSprite lastChar = (CCSprite)label2.getChildByTag(3);

            lastChar.runAction((CCAction)(rot_4ever.copy()));

            //schedule( schedule_selector(Atlas4::step), 0.1f);
            base.schedule(step, 0.1f);
        }
Exemple #4
0
 public override CCFiniteTimeAction Reverse()
 {
     return(CCJumpBy.actionWithDuration(Duration, CCPointExtension.ccp(-m_delta.X, -m_delta.Y), m_height, m_nJumps));
 }
Exemple #5
0
 public override CCFiniteTimeAction reverse()
 {
     return(CCJumpBy.actionWithDuration(this.m_fDuration, CCPointExtension.ccp(-this.m_delta.x, -this.m_delta.y), this.m_height, this.m_nJumps));
 }