libgdx API

com.badlogic.gdx.scenes.scene2d
Class AnimationAction

java.lang.Object
  extended by com.badlogic.gdx.scenes.scene2d.Action
      extended by 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

Field Summary
protected  boolean done
           
protected  float duration
           
protected  Interpolator interpolator
           
protected  float invDuration
           
protected  float taken
           
protected  Actor target
           
 
Fields inherited from class com.badlogic.gdx.scenes.scene2d.Action
listener
 
Constructor Summary
AnimationAction()
           
 
Method Summary
protected  float createInterpolatedAlpha(float delta)
           
 void finish()
          Called by the owner of the action when it can release all its resources, e.g.
 Actor getTarget()
           
 boolean isDone()
           
 void reset()
          Sets the Action back to a vanilla state.
 AnimationAction setInterpolator(Interpolator interpolator)
          Sets an Interpolator to modify the progression of the animations.
 
Methods inherited from class com.badlogic.gdx.scenes.scene2d.Action
act, callActionCompletedListener, copy, getCompletionListener, setCompletionListener, setTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

duration

protected float duration

invDuration

protected float invDuration

taken

protected float taken

target

protected Actor target

done

protected boolean done

interpolator

protected Interpolator interpolator
Constructor Detail

AnimationAction

public AnimationAction()
Method Detail

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

libgdx API

Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)