Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

All
I have working on andEngine Live wallpaper and I have use SpriteParticleSystem. I want to add touch event to every Sprite of SpriteParticleSystem and remove that sprite from scene.

I have use below code for create particle system.

final SpriteParticleSystem particleSystem = new SpriteParticleSystem(new PointParticleEmitter(mParticleX, mParticleY),mParticleMinRate, mParticleMaxRate, mParticleMax,this.mFlowerTextureRegion, this.getVertexBufferObjectManager());


        //particleSystem.addParticleInitializer(new BlendFunctionParticleInitializer<Sprite>(GLES20.GL_SRC_ALPHA, GLES20.GL_ONE));
        particleSystem.addParticleInitializer(new VelocityParticleInitializer<Sprite>(-90, 0, 0, 0));
        particleSystem.addParticleInitializer(new AccelerationParticleInitializer<Sprite>(8, -11));
        particleSystem.addParticleInitializer(new RotationParticleInitializer<Sprite>(0.0f, 360.0f));
        //particleSystem.addParticleInitializer(new ColorParticleInitializer<Sprite>(1.0f, 1.0f, 0.0f));
        particleSystem.addParticleInitializer(new ExpireParticleInitializer<Sprite>(15.5f));

        particleSystem.addParticleModifier(new ScaleParticleModifier<Sprite>(0, 5, 0.5f, 2.0f));
        background = new Sprite(0, 0, backgroundTextureRegion, mEngine.getVertexBufferObjectManager());
        background.setPosition((CAMERA_WIDTH - background.getWidth()) * 0.5f, (CAMERA_HEIGHT - background.getHeight()) * 0.5f);
        //background.setScale(1.5f);
        //SpriteBackground bg = new SpriteBackground(background);
        //mScene.setBackground(bg);
        this.mScene.attachChild(background);
        this.mScene.attachChild(particleSystem);  <br>

Thanks in advance.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

i think there is no way to make spriteparticle clickable as i am facing the same problem have you got the answer

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.