setLifespan method
A control method allowing a parent of this Particle to pass down it's lifespan.
Allows to only specify desired lifespan once, at the very top of the Particle tree which then will be propagated down using this method.
See SingleChildParticle
or ComposedParticle for details.
Implementation
@override
void setLifespan(double lifespan) {
super.setLifespan(lifespan);
if (applyLifespanToChildren) {
for (final child in children) {
child.setLifespan(lifespan);
}
}
}