Artenus 2D Framework
Artenus Reference
Performs a fading effect animation for sprites. You can specify whether you want the sprite to appear or disappear.
public final class FadeAnimation
implements AnimationHandler

Constructor Summary

Modifier and TypeConstructor and Description
public FadeAnimation(boolean fadeIn, float speed)
Creates a FadeAnimation with the specified behavior.

Method Summary

Modifier and TypeMethod and Description
public voidadvance(Animatable entity, float elapsedTime)
Called whenever the animation should update the animatable based on elapsed time.

Methods inherited from java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FadeAnimation
public  FadeAnimation(
    boolean fadeIn,
    float speed
)
Creates a FadeAnimation with the specified behavior.
Parameters:
fadeInWhether the handled sprite should appear (or fade in)
speedThe speed of fading in. Setting this value to 1 causes a fully hidden object to appear completely in one second. Higher values make this transition faster and lower values make it slower.

Method Detail

advance
public void advance(
    Animatable entity,
    float elapsedTime
)
Called whenever the animation should update the animatable based on elapsed time.
Specified By: