As the comments state, the issue is that you are using a single effect for multiple bullets. I suspect it is set to non-continuous, so has a limited duration. As time goes by, the effect runs out.
I would suggest creating a particle effect pool for the effect, and obtain()
from / free()
to the pool. Attach a single effect to each bullet. This allows you to run multiple effects while limiting garbage collection (due to the pooling) as well as avoiding a load of the .p
file for each new effect. The pool is created with a template that is copied each time obtain()
is called. Note the cast to PooledEffect on the call to free()
.
import com.badlogic.gdx.graphics.g2d.ParticleEffect;
import com.badlogic.gdx.graphics.g2d.ParticleEffectPool;
import com.badlogic.gdx.graphics.g2d.ParticleEffectPool.PooledEffect;
...
ParticleEffect template = new ParticleEffect();
template.load(Gdx.files.internal("data/particle/bigexplosion.p"),
..texture..);
ParticleEffectPool bigExplosionPool = new ParticleEffectPool(template, 0, 20);
...
ParticleEffect particle = bigExplosionPool.obtain();
... // Use the effect, and once it is done running, clean it up
bigExplosionPool.free((PooledEffect) particle);
Conversely, you could skip the pools and make the smoke particle effect loop (continuous). This may not won't get you exactly what you're looking for, and might be considered a kludge, but might work in a pinch.