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({
required ParticleGenerator generator,
int count = 10,
double? lifespan,
bool applyLifespanToChildren = true,
}) {
return ComposedParticle(
lifespan: lifespan,
applyLifespanToChildren: applyLifespanToChildren,
children: List<Particle>.generate(count, generator),
);
}