0

I am trying to make it so when a particle hits a certain block(dirt, grass, rock) it does a little mini explosion of that type of blocks Texture. I don't want to make a ton of particles for the hundreds of block types I have so is there a way to do this at runtime?

Temo
  • 85
  • 1
  • 5
  • Possible duplicate of [Can libgdx Particle Effects use texture regions?](http://stackoverflow.com/questions/22531814/can-libgdx-particle-effects-use-texture-regions) – Pinkie Swirl Oct 25 '15 at 18:03

1 Answers1

1

Ah! Is this why you were asking about the ParticleEmitter class?

You should be able to do this by creating a Sprite with the texture you want, and then call the ParticleEmitter's setSprite(Sprite sprite) method.

Caveat - I haven't actually done this myself, but it ought to work.

Phil Anderson
  • 3,146
  • 13
  • 24