I have a problem with particles in libGDX. Basicly they don't show at all and I have no idea why.
I use Scene2D and I created Particles actor: http://wklej.org/id/1534258/
I create it like this: particleTest = new ParticleEffectActor("test.p");
In my game I have 2 gui stages. I added particles to all of them in show() method of the screen:
menuStage.addActor(particleTest);
gameGuiStage.addActor(particleTest);
I also have another stage for my game (scaled by pixelPerMeter value). I tried to add it like this:
effect = new ParticleEffectActor("powerup.p");
gameWorld.getWorldStage().addActor(effect);
In this case I alsotried some tricks with positioning but still no effect.
What is wrong? Thanks for help
I finally managed to make a working version:
here's an actor;
and this is how I use it:
and
effectActor.setPosition(getX() + getWidth()/2, getY() + getHeight()/2);
in act()