Used for storing a large number of Particles. This efficiently handles storing and updating them.
Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CircularParticleEmitter"/> class.
 /// </summary>
 /// <param name="particleDelay">The particle delay.</param>
 /// <param name="velocity">The velocity of a particle that is launched.</param>
 /// <param name="action">The action that draws and updates a particle.</param>
 /// <param name="particles">The particles to add a particle to.</param>
 public CircularParticleEmitter(long particleDelay, float velocity, ParticleAction action, ParticleContainer particles)
 {
     this.ParticleDelay = particleDelay;
     this.NextParticleTime = GameClock.Now + particleDelay;
     this.velocity = velocity;
     this.Action = action;
     this.particles = particles;
     this.random = new Random();
     this.previousPosition = new Vector2(float.MinValue);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CircularParticleEmitter"/> class.
 /// </summary>
 /// <param name="particleDelay">The particle delay.</param>
 /// <param name="velocity">The velocity of a particle that is launched.</param>
 /// <param name="action">The action that draws and updates a particle.</param>
 /// <param name="particles">The particles to add a particle to.</param>
 public CircularParticleEmitter(long particleDelay, float velocity, ParticleAction action, ParticleContainer particles)
 {
     this.ParticleDelay    = particleDelay;
     this.NextParticleTime = GameClock.Now + particleDelay;
     this.velocity         = velocity;
     this.Action           = action;
     this.particles        = particles;
     this.random           = new Random();
     this.previousPosition = new Vector2(float.MinValue);
 }