Class ParticleEffectActor

java.lang.Object
com.prineside.tdi2.scene2d.Actor
com.prineside.tdi2.scene2d.ui.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.
  • Constructor Details

    • ParticleEffectActor

      public ParticleEffectActor(ParticleEffect particleEffect, boolean resetOnStart)
    • ParticleEffectActor

      public ParticleEffectActor(FileHandle particleFile, TextureAtlas atlas)
    • ParticleEffectActor

      public ParticleEffectActor(FileHandle particleFile, FileHandle imagesDir)
  • Method Details

    • 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()
    • setResetOnStart

      public ParticleEffectActor setResetOnStart(boolean resetOnStart)
    • isAutoRemove

      public boolean isAutoRemove()
    • setAutoRemove

      public ParticleEffectActor setAutoRemove(boolean autoRemove)
    • isRunning

      public boolean isRunning()
    • getEffect

      public ParticleEffect getEffect()
    • cancel

      public void cancel()
    • allowCompletion

      public void allowCompletion()
    • dispose

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