void GenerateParticles(int amount) { for (int i = 0; i < amount; i++) { Particle2D p = new Particle2D("Particle" + particles.Count, emittionType.GeneratePosition(), mass.GetRandomWithin(), lifeTime.GetRandomWithin(), attachments.GeneratePropertySet()); p.OnDead += new OnDeadParticleEvent(ParticleDead); if (renderMethod is IUpdateableRenderer) { ((IUpdateableRenderer)renderMethod).GenerateNew(); } particles.Add(p); } }