Package yearreview.app.animation
Class AnimationManager
java.lang.Object
yearreview.app.animation.AnimationManager
Class that Stores all currently running animations and allows updating all of them in one function-call.
- Author:
- ColdStone37
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final HashSet<AnimatedNumber>
Set that stores all currently running animations. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static void
addAnimation
(AnimatedNumber animation) Adds an animation to the Manager.static void
updateAnimations
(int millis) Updates all animations by a certain amount of milliseconds.
-
Field Details
-
animations
Set that stores all currently running animations.
-
-
Constructor Details
-
AnimationManager
public AnimationManager()
-
-
Method Details
-
addAnimation
Adds an animation to the Manager. It will automatically be removed if the animation is over and has to be reinserted if the animation starts again.- Parameters:
animation
- animation to insert into the manager
-
updateAnimations
public static void updateAnimations(int millis) Updates all animations by a certain amount of milliseconds. Animations that have finished will be removed from the Manager.- Parameters:
millis
- milliseconds to update the animations with
-