generate static method
Generates a given amount of particles and then combining them into one single ComposedParticle.
Useful for procedural particle generation.
Implementation
static Particle generate({
int count = 10,
required ParticleGenerator generator,
double? lifespan,
}) {
return ComposedParticle(
lifespan: lifespan,
children: List<Particle>.generate(count, generator),
);
}