Package com.spinyowl.legui.animation
Class Animation
java.lang.Object
com.spinyowl.legui.animation.Animation
- Direct Known Subclasses:
ScrollBarAnimation,SelectBoxAnimation,ViewportAnimation
Draft animation realization.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCalled one time when animation ended.protected abstract booleananimate(double delta) This method used to update animated object.protected voidCalled one time before animate loop.booleanReturns the flag that indicates if animation was started.voidAdds animation to animator.voidUsed to stop animation.
-
Constructor Details
-
Animation
public Animation()
-
-
Method Details
-
startAnimation
public void startAnimation()Adds animation to animator. -
beforeAnimation
protected void beforeAnimation()Called one time before animate loop. -
animate
protected abstract boolean animate(double delta) This method used to update animated object. Called by animator every frame. Removed from animator and stops when this method returns true.Returns true if animation is finished and could be removed from animator.
- Parameters:
delta- delta time (from previous call).- Returns:
- true if animation is finished and could be removed from animator.
-
afterAnimation
protected void afterAnimation()Called one time when animation ended. -
stopAnimation
public void stopAnimation()Used to stop animation. Removes animation from animator. -
isAnimationStarted
public boolean isAnimationStarted()Returns the flag that indicates if animation was started.- Returns:
- the flag that indicates if animation was started.
-