Artenus 2D Framework
Artenus Reference
Interface for all entities that can be animated. Sprites all implement this behavior.

See Also:

public interface Animatable

Method Summary

Modifier and TypeMethod and Description
public voidadvance(float elapsedTime)
Advances the animation for this animatable.
public AnimationHandlergetAnimation()
Gets the animation handler currently affecting this animatable.
public voidsetAnimation(AnimationHandler animation)
Assigns an animation handler to handle animations for this animatable.

Method Detail

advance
public void advance(
    float elapsedTime
)
Advances the animation for this animatable. This method is called once per animation frame.
Parameters:
elapsedTimeThe amount of time since last call to this method
getAnimation
public AnimationHandler getAnimation()
Gets the animation handler currently affecting this animatable.
Returns:
Animation handler
setAnimation
public void setAnimation(
    AnimationHandler animation
)
Assigns an animation handler to handle animations for this animatable.
Parameters:
animationAnimation handler, or null to remove the animation handler