com.badlogic.gdx.scenes.scene2d
Class AnimationAction
java.lang.Object
com.badlogic.gdx.scenes.scene2d.Action
com.badlogic.gdx.scenes.scene2d.AnimationAction
- Direct Known Subclasses:
- FadeIn, FadeOut, FadeTo, MoveBy, MoveTo, RotateBy, RotateTo, ScaleTo
public abstract class AnimationAction
- extends Action
An AnimationAction
performs a transformation on its target Actor
. These transformations physically change the
Actor itself.
- Author:
- Moritz Post
Fields inherited from class com.badlogic.gdx.scenes.scene2d.Action |
listener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
duration
protected float duration
invDuration
protected float invDuration
taken
protected float taken
target
protected Actor target
done
protected boolean done
interpolator
protected Interpolator interpolator
AnimationAction
public AnimationAction()
isDone
public boolean isDone()
- Specified by:
isDone
in class Action
- Returns:
- whether the action is done or not
finish
public void finish()
- Description copied from class:
Action
- Called by the owner of the action when it can release all its resources, e.g. put itself back into a pool.
- Overrides:
finish
in class Action
setInterpolator
public AnimationAction setInterpolator(Interpolator interpolator)
- Sets an
Interpolator
to modify the progression of the animations.
- Parameters:
interpolator
- the interpolator to use during the animation
- Returns:
- an instance of self so that the call can be easily chained
createInterpolatedAlpha
protected float createInterpolatedAlpha(float delta)
getTarget
public Actor getTarget()
- Specified by:
getTarget
in class Action
- Returns:
- the
Actor
this action targets.
reset
public void reset()
- Description copied from class:
Action
- Sets the Action back to a vanilla state.
- Overrides:
reset
in class Action
Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)