Beispiel #1
0
        public override Particle CreateParticle()
        {
            var particle = ParticleImage.Generate();

            particle.image = Properties.Resources.w1;

            particle.FromColor = Color.White;
            particle.ToColor   = Color.FromArgb(0, Color.Blue);
            particle.X         = Position.X;
            particle.Y         = Position.Y;
            return(particle);
        }
Beispiel #2
0
        public Color ToColor   = Color.FromArgb(0, Color.Blue); // конечный цвет

        public override Particle CreateParticle()
        {
            var particle = ParticleImage.Generate();

            particle.image = Properties.Resources.w1;

            particle.FromColor = this.FromColor;
            particle.ToColor   = Color.FromArgb(0, this.ToColor);
            particle.Direction = this.Direction + Particle.rand.Next(-Spread / 2, Spread / 2);
            particle.Speed     = this.Speed + Particle.rand.Next(10);
            particle.Radius    = this.Radius + Particle.rand.Next(5);
            particle.Life      = this.Life + Particle.rand.Next(100);

            particle.X = Position.X;
            particle.Y = Position.Y;
            return(particle);
        }