I want to know how to achieve particle effects in 2D scenes?
Configure a ParticleGroup and add them to your scene using a Particles object.
Use the Variables on the Particle Group to control velocity, angle, etc.
class Main extends hxd.App {
override function init() {
var tf = new h2d.Text(hxd.res.DefaultFont.get(), s2d);
tf.text = "Hello Hashlink !";
// Create the Particles object that will hold and display Particle Groups
var particles = new h2d.Particles(s2d);
// Create a Particle Group
var particleGroup = new ParticleGroup(particles);
// Add it to our Particles object so the Particle Group (emitter) will be displayed)
particles.addGroup(particleGroup);
}
static function main() {
new Main();
}
}
If you want, you can use HIDE as an editor to configure your ParticleGroups in a more visual way.