コード例 #1
0
        public override void onEnter()
        {
            base.onEnter();

            m_emitter = CCParticleMeteor.node();

            m_background.addChild(m_emitter, 10);

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

            setEmitterPosition();
        }
コード例 #2
0
ファイル: LogoNode.cs プロジェクト: foobit/ChipmunkSharp
        CCParticleMeteor CreateGalaxy(CCPoint position)
        {
            CCParticleMeteor dev = new CCParticleMeteor(position)
            {
                Angle           = 90,
                AngleVar        = 360,
                BlendFunc       = new CCBlendFunc(772, 772),
                EmissionRate    = 50,
                Life            = 0.5f,
                Speed           = 60,
                SpeedVar        = 10,
                StartSize       = 100,
                TangentialAccel = 80
            };

            return(dev);
        }
コード例 #3
0
ファイル: LogoNode.cs プロジェクト: foobit/ChipmunkSharp
        CCParticleMeteor CreateMeteor(CCPoint position)
        {
            CCParticleMeteor dev = new CCParticleMeteor(position)
            {
                Angle        = 90,
                AngleVar     = 360,
                BlendFunc    = new CCBlendFunc(1, 772),
                EmissionRate = 50,
                Gravity      = new CCPoint(0, 200),
                Life         = 1f,
                Speed        = 15,
                SpeedVar     = 5,
                StartSize    = 100
            };

            return(dev);
        }
コード例 #4
0
ファイル: LogoNode.cs プロジェクト: foobit/ChipmunkSharp
        public LogoNode()
        {
            xamarinLogo       = new CCSprite("xamarin-logo-no-shadow.png");
            xamarinLogo.Scale = .4f;
            AddChild(xamarinLogo, 2);

            ContentSize = xamarinLogo.ContentSize;

            xamarinLogo.Position = new CCPoint(
                ContentSize.Width * xamarinLogo.ScaleX * ScaleX * .5f,
                ContentSize.Height * xamarinLogo.ScaleY * ScaleY * .5f);

            ParticleStay       = CreateMeteor(new CCPoint(100, 100));
            ParticleStay.Scale = .55f;
            AddChild(ParticleStay, 1);

            ParticleStay.Position = xamarinLogo.Position;
        }
コード例 #5
0
        private void SetBackground(CCRect bounds, string backgroundImage)
        {
            var bg = new CCSprite(backgroundImage);

            bg.ContentSize = new CCSize(bounds.MaxX, bounds.MaxY);
            bg.Position    = bounds.Center;
            AddChild(bg);

            // test -------
            var topOfscreen = bounds.Center.Offset(0f, bounds.MaxY / 2f);
            var meteor      = new CCParticleMeteor(new CCPoint(-500, 2000));
            var moveTo      = new CCMoveTo(3.0f, new CCPoint(bounds.MaxX + 500, -300));
            var seq         = new CCSequence(new CCEaseOut(moveTo, 2), new CCMoveTo(5, moveTo.PositionEnd), new CCMoveTo(0, new CCPoint(-500, 2000)));

            meteor.RunAction(new CCRepeatForever(seq));
            AddChild(meteor);

            var galaxy = new CCParticleGalaxy(topOfscreen.Offset(200.0f, -100.0f));

            AddChild(galaxy);
            // ------------
        }
コード例 #6
0
 public static new CCParticleMeteor Create()
 {
     var ret = new CCParticleMeteor();
     ret.InitWithTotalParticles(150);
     return ret;
 }