Class ParticleEffectActor

  • All Implemented Interfaces:
    Disposable

    public class ParticleEffectActor
    extends Actor
    implements Disposable
    ParticleEffectActor holds an ParticleEffect to use in Scene2d applications. The particle effect is positioned at 0, 0 in the ParticleEffectActor. Its bounding box is not limited to the size of this actor.
    • Field Detail

      • lastDelta

        protected float lastDelta
      • isRunning

        protected boolean isRunning
      • ownsEffect

        protected boolean ownsEffect
    • Constructor Detail

      • ParticleEffectActor

        public ParticleEffectActor​(ParticleEffect particleEffect,
                                   boolean resetOnStart)
      • ParticleEffectActor

        public ParticleEffectActor​(FileHandle particleFile,
                                   FileHandle imagesDir)
    • Method Detail

      • draw

        public void draw​(Batch batch,
                         float parentAlpha)
        Description copied from class: Actor
        Draws the actor. The batch is configured to draw in the parent's coordinate system. This draw method is convenient to draw a rotated and scaled TextureRegion. Batch.begin() has already been called on the batch. If Batch.end() is called to draw without the batch then Batch.begin() must be called before the method returns.

        The default implementation does nothing.

        Overrides:
        draw in class Actor
        parentAlpha - The parent alpha, to be multiplied with this actor's alpha, allowing the parent's alpha to affect all children.
      • act

        public void act​(float delta)
        Description copied from class: Actor
        Updates the actor based on time. Typically this is called each frame by Stage.act(float).

        The default implementation calls Action.act(float) on each action and removes actions that are complete.

        Overrides:
        act in class Actor
        Parameters:
        delta - Time in seconds since the last frame.
      • start

        public void start()
      • isResetOnStart

        public boolean isResetOnStart()
      • isAutoRemove

        public boolean isAutoRemove()
      • isRunning

        public boolean isRunning()
      • scaleChanged

        protected void scaleChanged()
        Description copied from class: Actor
        Called when the actor's scale has been changed.
        Overrides:
        scaleChanged in class Actor
      • cancel

        public void cancel()
      • allowCompletion

        public void allowCompletion()
      • dispose

        public void dispose()
        Description copied from interface: Disposable
        Releases all resources of this object.
        Specified by:
        dispose in interface Disposable