Example #1
0
        public override void OnEnter()
        {
base.OnEnter(); CCSize windowSize = Layer.VisibleBoundsWorldspace.Size;

            Emitter = new CCParticleFlower(MidWindowPoint);
            Background.AddChild(Emitter, 10);
            Emitter.Texture = CCTextureCache.SharedTextureCache.AddImage(TestResource.s_stars1);

			SetEmitterPosition();

        }
        public override void OnEnter()
        {

            base.OnEnter(); 

            Emitter = new CCParticleFlower(MidWindowPoint);

            Background.AddChild(Emitter, 10);

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

			SetEmitterPosition();

        }
Example #3
0
        public override void OnEnter()
        {
            base.OnEnter(); CCSize windowSize = Layer.VisibleBoundsWorldspace.Size;

            Background.Parent.RemoveChild(Background, true);
            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));

            Emitter = new CCParticleFlower(MidWindowPoint);

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

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

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

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

            base.OnEnter();

            Emitter = new CCParticleFlower(Background.ContentSize.Center);
            Background.AddChild(Emitter, 10);
            Emitter.Texture = CCTextureCache.SharedTextureCache.AddImage(TestResource.s_stars1);

			SetEmitterPosition();

        }