public override void Update(double ElapsedTime)
        {
            base.Update(ElapsedTime);
            _Limiter.Update(ElapsedTime);
            if (_Limiter.Ready && _Effecting)
            {
                Particle p = new Particle(RNG.Next(320), RNG.Next(4) + 1, RNG.Next(12));
                p.TimeToLive = 5;
                p.X          = x;
                p.Y          = y;
                p.Color      = ColorPicker.FromArgb(0, ColorPicker.RandomColor());

                p.Transform += SinXFunction;
                p.Transform += SinYFunction;
                p.Transform += OpacityFunction;

                p.Model = AnimationFactory.GenerateAnimation("Images//particleloop.png", 32, 32, 5, 0.05);
                p.Image = p.Model.Frames[0];
                //p.Image = new Frame("Images\\particle.png", new System.Drawing.Rectangle(0, 0, 32, 32), 0);

                this.Add(p);
            }
        }
Exemple #2
0
 public static int RandomColorToInt()
 {
     return(Color.FromArgb(RNG.Next(255), RNG.Next(255), RNG.Next(255), RNG.Next(255)).ToArgb());
 }
Exemple #3
0
 public static Color RandomColorWithAlpha()
 {
     return(Color.FromArgb(RNG.Next(255), RNG.Next(255), RNG.Next(255), RNG.Next(255)));
 }
Exemple #4
0
 public static Color RandomColor()
 {
     return(Color.FromArgb(255, RNG.Next(255), RNG.Next(255), RNG.Next(255)));
 }