S - the generic typepublic class Animation<S extends ITransformable>
extends java.lang.Object
| Constructor and Description |
|---|
Animation(S transformable,
Transformation<?,S> transform)
Instantiates a new
Animation. |
| Modifier and Type | Method and Description |
|---|---|
S |
animate(Timer timer)
Animates this
Animation. |
S |
getTransformable()
Gets the
ITransformable for this Animation. |
Transformation<?,S> |
getTransformation()
Gets the
Transformation for this Animation. |
boolean |
isFinished()
Checks if this
Animation is finished. |
boolean |
isStarted()
Checks if this
Animation is started. |
boolean |
persistance()
Checks if the animation should persist once the animation is finished.
|
void |
setDelay(int delay)
Sets the delay for the animation.
|
void |
setRender(boolean before,
boolean after)
Sets whether to render the
ITransformable before and after the animation. |
public Animation(S transformable, Transformation<?,S> transform)
Animation.transformable - the transformabletransform - the transformpublic S getTransformable()
ITransformable for this Animation.public Transformation<?,S> getTransformation()
Transformation for this Animation.public void setRender(boolean before,
boolean after)
ITransformable before and after the animation.before - the beforeafter - the afterpublic boolean isStarted()
Animation is started.public boolean isFinished()
Animation is finished.public void setDelay(int delay)
delay - the new delaypublic boolean persistance()