public override void Die()
 {
     Player.Points += pointValue;
     if (LevelManager.Current.UIStats.PowerShown)
     {
         if (pointValue != 0)
         {
             UIEffect e = new UIEffect(position, RandUnitVector2(), 0.1f, "+" + pointValue.ToString(), Color.Turquoise, 0.9f);
             UILayer.AddUIEffect(e);
         }
     }
     NormalMap.AddBlast2(position, Size / 20, Size / 8);
 }
Example #2
0
        public override void Die()
        {
            Vector2 nV;

            for (int i = 0; i < DEATH_GROWTH; i++)
            {
                nV = RandUnitVector2();
                Player.AddGrower(position, nV * Player.BulletSpeed, (float)Game1.rand.NextDouble() * 0.5f + 1f);
            }

            LevelManager.NextLevel(true);
            NormalMap.AddBlast2(position, 20, 5);
            base.Die();
        }
        public virtual void Die()
        {
            Player.Points += pointValue;
            float pointsToAdd = (float)pointValue * Player.Multiplier;

            Player.Score += pointsToAdd;

            float txtScale = 0.9f;
            float grav     = 0.1f;

            if (pointsToAdd > 100)
            {
                txtScale = 1.5f;
                grav     = 0.04f;
            }
            if (LevelManager.Current.UIStats.PowerShown)
            {
                if (pointValue != 0)
                {
                    UIEffect e = new UIEffect(position, RandUnitVector2(), 0.1f, "+" + pointValue.ToString(), Color.Turquoise, 0.9f);
                    UILayer.AddUIEffect(e);
                }
            }
            if (pointValue != 0)
            {
                VertexBag v = new VertexBag(UIPositions.Score + UIPositions.ScoreOffset, Color.GreenYellow,
                                            Color.LawnGreen, 1, Math.Min((int)(50 * pointsToAdd), 1000), 10);
                UILayer.AddParticleEffect(v);
                UIEffect b = new UIEffect(position, RandUnitVector2(),
                                          grav, "+" + Math.Round(pointsToAdd, 1).ToString(),
                                          Color.Yellow, txtScale);

                UILayer.AddUIEffect(b);
            }
            NormalMap.AddBlast2(position, Size / 10, Size / 8);
        }