Exemple #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);
        }
        public override void onEnter()
        {
            base.onEnter();

            m_emitter = CCParticleFireworks.node();
            m_background.addChild(m_emitter, 10);

            m_emitter.Texture = CCTextureCache.sharedTextureCache().addImage(TestResource.s_stars1);

            setEmitterPosition();
        }