-
-
Notifications
You must be signed in to change notification settings - Fork 229
Particle System
Axmol includes a particle system, which can be used for generating complex visual effects as explosions, fire or rain. Particles are performant and they can be used for creating complex visuals, but trying to keep their number low is recommendable.
Axmol has some built-in particle effects: ParticleFire
, ParticleFireworks
, ParticleGalaxy
, ParticleExplosion
, ParticleRain
and many others. You'll find all the built-in effects in the documentation. You can modify them in order to get the desired effect.
If those are not enough and you want a more tailored solutions, there are available online and native tools, both free and paid, that you can use to generate a .plist
file to use in your game or application with ParticleSystemQuad
:
auto myEmitter = ParticleSystemQuad::create("myEmitterFile.plist");
myEmitter->setTexture(Director::getInstance()->getTextureCache()->addImage("myParticleImage.png"));
myEmitter->setPosition(Vec2(100, 100));
scene->addChild(myEmitter);
Please remember the emitter node doesn't disappear even if the particle effect itself has finished. Please make sure you remove the node with myEmitter->removeFromParent()
after using it.
- Particle2dx: web-based particle editor (GitHub).
- Felgo Particle Editor: multiplatform particle editor.
- Particle Designer (MacOS)
- Particle Creator Pro (MacOS)
Effekseer is included with Axmol as an extension, OFF
by default (see how to activate it here). It's a powerful particle editor, but it works in a different way than the native particle system. You can find the documentation and tutorials in their website.