Esempio n. 1
0
        protected override void Update(GameTime gameTime)
        {
            base.Update(gameTime);
            Controls();
            ControlOpacity(gameTime);
            foreach (Nova_Particle p in particles)
            {
                p.Update(gameTime, Matrix.CreateTranslation(0, 0, 0));
            }
            if (!isShow)
            {
                Nova_Particle p = new Nova_Particle();
                p.SetTexture(Nova_DataBase.GetTexture("bar"), SpriteEffects.None, Microsoft.Xna.Framework.Color.Blue);
                p.Position        = new Vector2(0, 75);
                p.LifeTime        = 1500;
                p.InitialLifeTime = 1500;
                p.SetFadeOut(1500);
                p.IsAllColorsUntilDie = true;
                p.SetDirectionSpeed(new Vector2(20, 0));
                p.inflateSizeHeight = (int)(sumPower * 3);
                p.SetInternalRotation(0, 1, Nova_Functions.GetCenterOf(p.GetCurrentTexture()), Nova_Particle.RotationDirectionEnum.clockwise);
                p.inflateSizeWidth = 10;
                emiters.Add(p);

                Nova_Particle.DoUpdateParticles(emiters, gameTime, Matrix.CreateTranslation(0, 0, 0));
            }
            UpdatePlayer();
        }
Esempio n. 2
0
 protected override void Update(GameTime gameTime)
 {
     try
     {
         base.Update(gameTime);
         Controls();
         foreach (Nova_Particle bar in particles)
         {
             bar.Update(gameTime, Matrix.CreateTranslation(0, 0, 0));
         }
         //Nova_Particle p = new Nova_Particle();
         //p.SetTexture(starTexture, SpriteEffects.None, Microsoft.Xna.Framework.Color.White);
         //p.Position = new Vector2(-p.GetCurrentTexture().Width, Nova_Functions.View.Height  - p.GetCurrentTexture().Height/2);
         //p.DestroyOnLeaveScreen = true;
         //int time = 3600;
         //p.LifeTime = time;
         //p.IsInflateBothSides = false;
         //p.InitialLifeTime = time;
         //p.SetFadeOut(time);
         ////p.SetInternalRotation(0, 2, Nova_Functions.GetCenterOf(p.GetCurrentTexture()), Nova_Particle.RotationDirectionEnum.clockwise);
         //p.SetInflateSize(0, -24 + (int)Math.Floor(sumPower)*5);
         //p.SpeedX = 20;
         //p.AcelerationFactorX = 0.9875f;
         //p.IsAllColorsUntilDie = true;
         ////p.SetDirectionRotation(4.0f, 2.0f, 0, 0, 0, 0, 1, 1, false);
         //emiters.Add(p);
         Nova_Particle.DoUpdateParticles(emiters, gameTime, Matrix.CreateTranslation(0, 0, 0));
         // CreateTextParticle();
         Nova_Particle.DoUpdateParticles(emitersText, gameTime, Matrix.CreateTranslation(0, 0, 0));
         UpdatePlayer();
     }
     catch
     {
         player.ClearInstance();
         player.StartCaptureAudioFromDefaultPlayerDevice();
     }
 }