Exemple #1
0
        public virtual Particle AddParticle(Vector2f position, Vector2f initialVelocity, Vector2f gravity, float lifeTime, Color color)
        {
            var particle = new Particle(position, initialVelocity, gravity, this, lifeTime, color);
            AddParticle(particle);

            return particle;
        }
Exemple #2
0
 public void RemoveParticle(Particle particle)
 {
     particles.Remove(particle);
 }
Exemple #3
0
        public void AddParticle(Particle particle)
        {
            if(particle == this) throw new ArgumentException("Can't add an emitter to itself.");

            particles.Add(particle);
        }
Exemple #4
0
 public abstract void ModifyParticle(Particle particle, float dt);