Beispiel #1
0
        public override void onEnter()
        {
            base.onEnter();

            // rotate and jump
            CCActionInterval jump1 = CCJumpBy.actionWithDuration(4, new CCPoint(-400, 0), 100, 4);
            CCActionInterval jump2 = jump1.reverse() as CCActionInterval;
            CCActionInterval rot1  = CCRotateBy.actionWithDuration(4, 360 * 2);
            CCActionInterval rot2  = rot1.reverse() as CCActionInterval;

            CCFiniteTimeAction seq3_1 = CCSequence.actions(jump2, jump1);
            CCFiniteTimeAction seq3_2 = CCSequence.actions(rot1, rot2);
            CCFiniteTimeAction spawn  = CCSpawn.actions(seq3_1, seq3_2);
            CCFiniteTimeAction action = CCRepeatForever.actionWithAction((CCActionInterval)spawn);

            CCRepeatForever action2 = (CCRepeatForever)(action.copy());
            CCRepeatForever action3 = (CCRepeatForever)(action.copy());


            m_grossini.runAction(CCSpeed.actionWithAction((CCActionInterval)action, 0.5f));
            m_tamara.runAction(CCSpeed.actionWithAction((CCActionInterval)action2, 1.5f));
            m_kathia.runAction(CCSpeed.actionWithAction((CCActionInterval)action3, 1.0f));

            CCParticleSystem emitter = CCParticleFireworks.node();

            emitter.Texture = CCTextureCache.sharedTextureCache().addImage("Images/fire");
            addChild(emitter);
        }
Beispiel #2
0
        public override void onEnter()
        {
            base.onEnter();

            // rotate and jump
            CCActionInterval jump1 = CCJumpBy.actionWithDuration(4, new CCPoint(-400, 0), 100, 4);
            CCActionInterval jump2 = (CCActionInterval)jump1.reverse();
            CCActionInterval rot1  = CCRotateBy.actionWithDuration(4, 360 * 2);
            CCActionInterval rot2  = (CCActionInterval)rot1.reverse();

            CCFiniteTimeAction seq3_1 = CCSequence.actions(jump2, jump1);
            CCFiniteTimeAction seq3_2 = CCSequence.actions(rot1, rot2);
            CCFiniteTimeAction spawn  = CCSpawn.actions(seq3_1, seq3_2);
            CCSpeed            action = CCSpeed.actionWithAction(CCRepeatForever.actionWithAction((CCActionInterval)spawn), 1.0f);


            action.tag = EaseTest.kTagAction1;

            CCAction action2 = (CCAction)(action.copy());
            CCAction action3 = (CCAction)(action.copy());

            action2.tag = EaseTest.kTagAction1;
            action3.tag = EaseTest.kTagAction1;

            m_grossini.runAction(action2);
            //m_grossini.runAction(CCRepeat.actionWithAction(CCSequence.actions(jump2, jump1), 5));
            m_tamara.runAction(action3);
            m_kathia.runAction(action);

            this.schedule(new SEL_SCHEDULE(altertime), 1.0f);//:@selector(altertime:) interval:1.0f];
        }
Beispiel #3
0
        public override void onEnter()
        {
            base.onEnter();

            alignSpritesLeft(1);

            CCAction action = CCSpawn.actions(
                CCJumpBy.actionWithDuration(2, new CCPoint(300, 0), 50, 4),
                CCRotateBy.actionWithDuration(2, 720));

            m_grossini.runAction(action);
        }