public class ParticleEffectActor extends Actor implements Disposable
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.Modifier and Type | Field and Description |
---|---|
protected boolean |
isRunning |
protected float |
lastDelta |
protected boolean |
ownsEffect |
Constructor and Description |
---|
ParticleEffectActor(FileHandle particleFile,
FileHandle imagesDir) |
ParticleEffectActor(FileHandle particleFile,
TextureAtlas atlas) |
ParticleEffectActor(ParticleEffect particleEffect,
boolean resetOnStart) |
Modifier and Type | Method and Description |
---|---|
void |
act(float delta)
Updates the actor based on time.
|
void |
allowCompletion() |
void |
cancel() |
void |
dispose()
Releases all resources of this object.
|
void |
draw(Batch batch,
float parentAlpha)
Draws the actor.
|
ParticleEffect |
getEffect() |
boolean |
isAutoRemove() |
boolean |
isResetOnStart() |
boolean |
isRunning() |
protected void |
scaleChanged()
Called when the actor's scale has been changed.
|
ParticleEffectActor |
setAutoRemove(boolean autoRemove) |
ParticleEffectActor |
setResetOnStart(boolean resetOnStart) |
void |
start() |
addAction, addCaptureListener, addListener, ancestorsVisible, ascendantsVisible, clear, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, debug, drawDebug, drawDebugBounds, fire, firstAscendant, getActions, getCaptureListeners, getColor, getDebug, getHeight, getListeners, getName, getOriginX, getOriginY, getParent, getRight, getRotation, getScaleX, getScaleY, getStage, getTop, getTouchable, getUserObject, getWidth, getX, getX, getY, getY, getZIndex, hasActions, hasKeyboardFocus, hasParent, hasScrollFocus, hit, isAscendantOf, isDescendantOf, isTouchable, isTouchFocusListener, isTouchFocusTarget, isVisible, localToActorCoordinates, localToAscendantCoordinates, localToParentCoordinates, localToScreenCoordinates, localToStageCoordinates, moveBy, notify, parentToLocalCoordinates, positionChanged, remove, removeAction, removeCaptureListener, removeListener, rotateBy, rotationChanged, scaleBy, scaleBy, screenToLocalCoordinates, setBounds, setColor, setColor, setDebug, setHeight, setName, setOrigin, setOrigin, setOriginX, setOriginY, setParent, setPosition, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setStage, setTouchable, setUserObject, setVisible, setWidth, setX, setX, setY, setY, setZIndex, sizeBy, sizeBy, sizeChanged, stageToLocalCoordinates, toBack, toFront, toString
protected float lastDelta
protected boolean isRunning
protected boolean ownsEffect
public ParticleEffectActor(ParticleEffect particleEffect, boolean resetOnStart)
public ParticleEffectActor(FileHandle particleFile, TextureAtlas atlas)
public ParticleEffectActor(FileHandle particleFile, FileHandle imagesDir)
public void draw(Batch batch, float parentAlpha)
Actor
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.
public void act(float delta)
Actor
Stage.act(float)
.
The default implementation calls Action.act(float)
on each action and removes actions that are complete.
public void start()
public boolean isResetOnStart()
public ParticleEffectActor setResetOnStart(boolean resetOnStart)
public boolean isAutoRemove()
public ParticleEffectActor setAutoRemove(boolean autoRemove)
public boolean isRunning()
public ParticleEffect getEffect()
protected void scaleChanged()
Actor
scaleChanged
in class Actor
public void cancel()
public void allowCompletion()
public void dispose()
Disposable
dispose
in interface Disposable