Class ParticleEffectActor
- java.lang.Object
-
- com.badlogic.gdx.scenes.scene2d.Actor
-
- com.badlogic.gdx.scenes.scene2d.ui.ParticleEffectActor
-
- All Implemented Interfaces:
Disposable
public class ParticleEffectActor extends Actor implements Disposable
ParticleEffectActor holds anParticleEffectto 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
Fields Modifier and Type Field Description protected booleanisRunningprotected floatlastDeltaprotected booleanownsEffect
-
Constructor Summary
Constructors Constructor Description ParticleEffectActor(FileHandle particleFile, FileHandle imagesDir)ParticleEffectActor(FileHandle particleFile, TextureAtlas atlas)ParticleEffectActor(ParticleEffect particleEffect, boolean resetOnStart)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidact(float delta)Updates the actor based on time.voidallowCompletion()voidcancel()voiddispose()Releases all resources of this object.voiddraw(Batch batch, float parentAlpha)Draws the actor.ParticleEffectgetEffect()booleanisAutoRemove()booleanisResetOnStart()booleanisRunning()protected voidscaleChanged()Called when the actor's scale has been changed.ParticleEffectActorsetAutoRemove(boolean autoRemove)ParticleEffectActorsetResetOnStart(boolean resetOnStart)voidstart()-
Methods inherited from class com.badlogic.gdx.scenes.scene2d.Actor
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
-
-
-
-
Constructor Detail
-
ParticleEffectActor
public ParticleEffectActor(ParticleEffect particleEffect, boolean resetOnStart)
-
ParticleEffectActor
public ParticleEffectActor(FileHandle particleFile, TextureAtlas atlas)
-
ParticleEffectActor
public ParticleEffectActor(FileHandle particleFile, FileHandle imagesDir)
-
-
Method Detail
-
draw
public void draw(Batch batch, float parentAlpha)
Description copied from class:ActorDraws the actor. The batch is configured to draw in the parent's coordinate system.This draw methodis convenient to draw a rotated and scaled TextureRegion.Batch.begin()has already been called on the batch. IfBatch.end()is called to draw without the batch thenBatch.begin()must be called before the method returns.The default implementation does nothing.
-
act
public void act(float delta)
Description copied from class:ActorUpdates the actor based on time. Typically this is called each frame byStage.act(float).The default implementation calls
Action.act(float)on each action and removes actions that are complete.
-
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()
-
scaleChanged
protected void scaleChanged()
Description copied from class:ActorCalled when the actor's scale has been changed.- Overrides:
scaleChangedin classActor
-
cancel
public void cancel()
-
allowCompletion
public void allowCompletion()
-
dispose
public void dispose()
Description copied from interface:DisposableReleases all resources of this object.- Specified by:
disposein interfaceDisposable
-
-