Class ParticleSystem

  • All Implemented Interfaces:
    RenderableProvider

    public final class ParticleSystem
    extends java.lang.Object
    implements RenderableProvider
    Singleton class which manages the particle effects. It's a utility class to ease particle batches management and particle effects update.
    • Constructor Detail

      • ParticleSystem

        public ParticleSystem()
    • Method Detail

      • get

        @Deprecated
        public static ParticleSystem get()
        Deprecated.
        Please directly use the constructor
      • removeAll

        public void removeAll()
        Removes all the effects added to the system
      • update

        public void update()
        Updates the simulation of all effects
      • updateAndDraw

        public void updateAndDraw()
      • update

        public void update​(float deltaTime)
      • updateAndDraw

        public void updateAndDraw​(float deltaTime)
      • begin

        public void begin()
        Must be called one time per frame before any particle effect drawing operation will occur.
      • draw

        public void draw()
        Draws all the particle effects. Call begin() before this method and end() after.
      • end

        public void end()
        Must be called one time per frame at the end of all drawing operations.
      • getRenderables

        public void getRenderables​(Array<Renderable> renderables,
                                   Pool<Renderable> pool)
        Description copied from interface: RenderableProvider
        Returns Renderable instances. Renderables are obtained from the provided Pool and added to the provided array. The Renderables obtained using Pool.obtain() will later be put back into the pool, do not store them internally. The resulting array can be rendered via a ModelBatch.
        Specified by:
        getRenderables in interface RenderableProvider
        Parameters:
        renderables - the output array
        pool - the pool to obtain Renderables from