コード例 #1
0
 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);
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 public static void AddUIEffect(UIEffect effect)
 {
     effects.Add(effect);
 }