Exemple #1
0
        public override void OnEnter()
        {
            base.OnEnter();

            m_emitter = new CCParticleFlower();


            m_background.AddChild(m_emitter, 10);

            m_emitter.Texture = CCTextureCache.SharedTextureCache.AddImage(TestResource.s_stars1);
            m_emitter.LifeVar = 0;
            m_emitter.Life = 10;
            m_emitter.Speed = (100);
            m_emitter.SpeedVar = (0);
            m_emitter.EmissionRate = 10000;

            setEmitterPosition();
        }
Exemple #2
0
        public override void OnEnter()
        {
            base.OnEnter();

            m_background.Parent.RemoveChild(m_background, true);
            m_background = null;

            CCParallaxNode p = new CCParallaxNode();
            AddChild(p, 5);

            CCSprite p1 = new CCSprite(TestResource.s_back3);
            CCSprite p2 = new CCSprite(TestResource.s_back3);

            p.AddChild(p1, 1, new CCPoint(0.5f, 1), new CCPoint(0, 250));
            p.AddChild(p2, 2, new CCPoint(1.5f, 1), new CCPoint(0, 50));

            m_emitter = new CCParticleFlower();

            m_emitter.Texture = CCTextureCache.SharedTextureCache.AddImage(TestResource.s_fire);

            p1.AddChild(m_emitter, 10);
            m_emitter.Position = new CCPoint(250, 200);

            CCParticleSun par = new CCParticleSun();
            p2.AddChild(par, 10);
            par.Texture = CCTextureCache.SharedTextureCache.AddImage(TestResource.s_fire);

            CCActionInterval move = new CCMoveBy (4, new CCPoint(300, 0));
            CCFiniteTimeAction move_back = move.Reverse();
            CCFiniteTimeAction seq = new CCSequence(move, move_back);
            p.RunAction(new CCRepeatForever ((CCActionInterval) seq));
        }
Exemple #3
0
        public override void OnEnter()
        {
            base.OnEnter();

            m_emitter = new CCParticleFlower();
            m_background.AddChild(m_emitter, 10);
            m_emitter.Texture = CCTextureCache.SharedTextureCache.AddImage(TestResource.s_stars1);

            setEmitterPosition();
        }