Is there a way to get the time until completion of a ParticleEffect
in libgdx
?
For example, say I want something to happen one second before the ParticleEffect
completes:
private void foo(){
ParticleEffect bombEffect = new ParticleEffect();
bombEffect.load(Gdx.files.internal("particles/bomb.p"), atlas);
.
.
.
if(timeToCompletion(bombEffect) < 1){
// do something
}
.
.
.
}
private float timeToCompletion(ParticleEffect pEffect){
// How can this be implemented??
}