Particle Effect Completion

Posted by Siddharth on Game Development See other posts from Game Development or by Siddharth
Published on 2012-06-08T08:43:06Z Indexed on 2012/06/08 16:50 UTC
Read the original article Hit count: 233

Filed under:

In my game I use particle effect for various purposes. In that I detect the completion of the particle effect. Basically I want to do something after completion of the particle effect. But the problem is that I didn't able to find the particle effect completion. So any community member please help me.

EDIT : I was creating particle effect using following code

    pointParticleEmtitter = new PointParticleEmitter(pX, pY);

    particleSystem = new ParticleSystem(pointParticleEmtitter, maxRate,
            minRate, maxParticles, mParticleTextureRegion.deepCopy());

    particleSystem.setBlendFunction(GL10.GL_SRC_ALPHA, GL10.GL_ONE);
    particleSystem.addParticleInitializer(new ColorInitializer(0f, 0f, 1f));
    particleSystem.addParticleModifier(new AlphaModifier(1, 0, 0, 0.5f));
    particleSystem.addParticleModifier(new ExpireModifier(0.5f));
    gameObject.getScene().attachChild(particleSystem);

Using above code the particle effect was started but when finished that I want to detect. After finishing effect I want to remove the object from the scene.

© Game Development or respective owner

Related posts about andengine