Esempio n. 1
0
        //Adds effects to the UI appropriate to the current scores
        private static void AddUIParticles()
        {
            if (Multiplier > 1)
            {
                VertexBag v = new VertexBag(UIPositions.Multiplier + UIPositions.MultiplierOffset, Color.White, Color.Yellow, 1, (int)((Multiplier / 5) * 50), (int)Multiplier + 4);
                UILayer.AddParticleEffect(v);
            }

            if (Points > 0)
            {
                VertexBag v = new VertexBag(UIPositions.Power + UIPositions.PowerOffset, Color.CadetBlue, Color.Cyan, 1, (int)((float)(Points / (float)stats.MaxPower) * 80), (int)((float)Points / (float)stats.MaxPower) * 5 + 3);
                UILayer.AddParticleEffect(v);
            }
        }
Esempio n. 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);
        }
Esempio n. 3
0
 public static void AddParticleEffect(VertexBag effect)
 {
     pEffects.Add(effect);
 }