Objective
Shows how to create a ParticleEffect, assign it to a Scene2D actor so that when that actor moves, the particle generator moves with it.
Concepts used in the code
- Create a Stage and Image (See basic Image Sample)
- Create a Label using a Skin (See basic Label Sample)
- Create a TextButton (See basic Button Sample)
- Create a Screen (See Screen Sample)
Particle effect is created using LibGDX’s Particle Effect editor.
Within the sample we create a stage, add the actors. The actors are added the particle effects and are drawn overriding the draw method.
Code
Full Code available for download here