You could go for a global Particle System that has a list of entities. Each cycle, the particle system iterates over its entities, and updates their effect. Entities could have some kind of reboot/reset method, so that the particle system recycles the same entities instead of constantly adding/removing new ones. If you have multiple variants of entities (different kind of fireworks), you could perhaps set the entity’s behaviour from some static context when they reset?
If you have a ParticleBehaviour class (or something equivalent), subclassed for different kind of fireworks, each entity of the same type of firework could reference the same instance of the ParticleBehaviour class (since it only contains logic of how the particles should evolve), so there would be no need to create new instances for each entity.
Most basic and direct example:
public class ParticleSystem
{
private final static ParticleBehaviour shootingStarBehaviour = new ShootingStarBehaviour();
private final static ParticleBehaviour bengalFireBehaviour = new BengalFireBehaviour();
...
// when entity dies,
entity.resetAt(float x, float y, float <);
entity.behaviour = bengalFireBehaviour;
...
}
No idea you can make sense of what I mean, but I’ll try to be more detailed if this seems like an approach you could go for.