APIdia Launch Partner
Top Description Fields Constructors Methods
com.badlogic.gdx.scenes.scene2d.ui

public Class ParticleEffectActor

extends Actor
implements Disposable
Class Inheritance
All Implemented Interfaces
com.badlogic.gdx.utils.Disposable
Imports
com.badlogic.gdx.files.FileHandle, com.badlogic.gdx.graphics.g2d.Batch, .ParticleEffect, .TextureAtlas, com.badlogic.gdx.scenes.scene2d.Actor, com.badlogic.gdx.utils.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 Summary

Modifier and TypeField and Description
private boolean
protected boolean
protected float
protected boolean
private final ParticleEffect
private boolean
Inherited from com.badlogic.gdx.scenes.scene2d.Actor:
POOLS

Constructor Summary

AccessConstructor and Description
public
ParticleEffectActor(ParticleEffect particleEffect, boolean resetOnStart)

public
public
ParticleEffectActor(FileHandle particleFile, FileHandle imagesDir)

Method Summary

Modifier and TypeMethod and Description
public void
act(float delta)

Overrides com.badlogic.gdx.scenes.scene2d.Actor.act.

Updates the actor based on time.

public void
public void
public void
dispose()

Implements com.badlogic.gdx.utils.Disposable.dispose.

Releases all resources of this object.

public void
draw(Batch batch, float parentAlpha)

Overrides com.badlogic.gdx.scenes.scene2d.Actor.draw.

Draws the actor.

public ParticleEffect
public boolean
public boolean
public boolean
protected void
scaleChanged()

Overrides com.badlogic.gdx.scenes.scene2d.Actor.scaleChanged.

Called when the actor's scale has been changed.

public ParticleEffectActor
setAutoRemove(boolean autoRemove)

public ParticleEffectActor
setResetOnStart(boolean resetOnStart)

public void
Inherited from com.badlogic.gdx.scenes.scene2d.Actor:
addActionaddCaptureListeneraddListenerancestorsVisibleascendantsVisibleclearclearActionsclearListenersclipBeginclipBeginclipEnddebugdrawDebugdrawDebugBoundsfirefirstAscendantgetActionsgetCaptureListenersgetColorgetDebuggetHeightgetListenersgetNamegetOriginXgetOriginYgetParentgetRightgetRotationgetScaleXgetScaleYgetStagegetTopgetTouchablegetUserObjectgetWidthgetXgetXgetYgetYgetZIndexhasActionshasKeyboardFocushasParenthasScrollFocushitisAscendantOfisDescendantOfisTouchableisTouchFocusListenerisTouchFocusTargetisVisiblelocalToActorCoordinateslocalToAscendantCoordinateslocalToParentCoordinateslocalToScreenCoordinateslocalToStageCoordinatesmoveBynotifyparentToLocalCoordinatespositionChangedremoveremoveActionremoveCaptureListenerremoveListenerrotateByrotationChangedscaleByscaleByscreenToLocalCoordinatessetBoundssetColorsetColorsetDebugsetHeightsetNamesetOriginsetOriginsetOriginXsetOriginYsetParentsetPositionsetPositionsetRotationsetScalesetScalesetScaleXsetScaleYsetSizesetStagesetTouchablesetUserObjectsetVisiblesetWidthsetXsetXsetYsetYsetZIndexsizeBysizeBysizeChangedstageToLocalCoordinatestoBacktoFronttoString

Field Detail

autoRemoveback to summary
private boolean autoRemove
isRunningback to summary
protected boolean isRunning
lastDeltaback to summary
protected float lastDelta
ownsEffectback to summary
protected boolean ownsEffect
particleEffectback to summary
private final ParticleEffect particleEffect
resetOnStartback to summary
private boolean resetOnStart

Constructor Detail

ParticleEffectActorback to summary
public ParticleEffectActor(ParticleEffect particleEffect, boolean resetOnStart)
ParticleEffectActorback to summary
public ParticleEffectActor(FileHandle particleFile, TextureAtlas atlas)
ParticleEffectActorback to summary
public ParticleEffectActor(FileHandle particleFile, FileHandle imagesDir)

Method Detail

actback to summary
public void act(float delta)

Overrides com.badlogic.gdx.scenes.scene2d.Actor.act.

Doc from com.badlogic.gdx.scenes.scene2d.Actor.act.

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.

Annotations
@Override
allowCompletionback to summary
public void allowCompletion()
cancelback to summary
public void cancel()
disposeback to summary
public void dispose()

Implements com.badlogic.gdx.utils.Disposable.dispose.

Doc from com.badlogic.gdx.utils.Disposable.dispose.

Releases all resources of this object.

Annotations
@Override
drawback to summary
public void draw(Batch batch, float parentAlpha)

Overrides com.badlogic.gdx.scenes.scene2d.Actor.draw.

Doc from com.badlogic.gdx.scenes.scene2d.Actor.draw.

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.

Annotations
@Override
getEffectback to summary
public ParticleEffect getEffect()
isAutoRemoveback to summary
public boolean isAutoRemove()
isResetOnStartback to summary
public boolean isResetOnStart()
isRunningback to summary
public boolean isRunning()
scaleChangedback to summary
protected void scaleChanged()

Overrides com.badlogic.gdx.scenes.scene2d.Actor.scaleChanged.

Doc from com.badlogic.gdx.scenes.scene2d.Actor.scaleChanged.

Called when the actor's scale has been changed.

Annotations
@Override
setAutoRemoveback to summary
public ParticleEffectActor setAutoRemove(boolean autoRemove)
setResetOnStartback to summary
public ParticleEffectActor setResetOnStart(boolean resetOnStart)
startback to summary
public void start()