Editing the Sprite
's fields to set it to the TextureRegion
works (Sprite
extends TextureRegion
, so it has all the relevant fields):
Sprite s = effect.getEmitters().get(0).getSprite();
s.setTexture(vessel.getTexture());
s.setU (someAtlasRegion.getU());
s.setU2(someAtlasRegion.getU2());
s.setV (someAtlasRegion.getV());
s.setV2(someAtlasRegion.getV2());
effect.getEmitters.get(0).setImagePath(someRegionName);
Edit: I don't know if ParticleEmitter.setImagePath()
matters or not, but I'd include that as well just in case - it definitely won't hurt. So I added that as well.