-
Notifications
You must be signed in to change notification settings - Fork 1
Particles
miguel edited this page Apr 5, 2019
·
4 revisions
DEPRECATED!
Particles make everything better: explosions, smoke, rocket trails, blood, tears and yes: even water and fire! Fortunately libgdx already supports particle systems natively and also comes with an own particle editor where you can create your own particle effects.
braingdx aims for an easy integration with libgdx by providing extendable interfaces and utilities to add particle effects without a hassle:
// Get the particle manager
ParticleManager manager = context.getParticleManager();
// Get the effect manually (pooled internally)
ParticleEffect effect = manager.get("my-particle-effect.p");
// Dispose the effect
manager.dispose(effect);
It is also possible to dynamically create effects:
GameObject object = context.getGameWorld().addGameObject();
context.getBehaviorManager().apply(object, new ParticleBehavior("my-particle-effect.p", manager));