Class CollectionSidebarAnimation<T>
java.lang.Object
net.megavex.scoreboardlibrary.api.sidebar.component.animation.CollectionSidebarAnimation<T>
- Type Parameters:
T- frame type
- All Implemented Interfaces:
FramedSidebarAnimation<T>,SidebarAnimation<T>
public final class CollectionSidebarAnimation<T>
extends Object
implements FramedSidebarAnimation<T>
Implementation of
FramedSidebarAnimation using a predefined collection of frames.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintframes()voidAdvances to the next frame of the animationvoidswitchFrame(int frameIndex) Switches the current frame
-
Constructor Details
-
CollectionSidebarAnimation
-
-
Method Details
-
frames
- Specified by:
framesin interfaceFramedSidebarAnimation<T>- Returns:
- all frames in this animation
-
currentFrameIndex
public int currentFrameIndex()- Specified by:
currentFrameIndexin interfaceFramedSidebarAnimation<T>- Returns:
- the index of the current frame
-
switchFrame
public void switchFrame(int frameIndex) Description copied from interface:FramedSidebarAnimationSwitches the current frame- Specified by:
switchFramein interfaceFramedSidebarAnimation<T>- Parameters:
frameIndex- the index of the new current frame
-
currentFrame
- Specified by:
currentFramein interfaceSidebarAnimation<T>- Returns:
- the current frame of the animation
-
nextFrame
public void nextFrame()Description copied from interface:SidebarAnimationAdvances to the next frame of the animation- Specified by:
nextFramein interfaceSidebarAnimation<T>
-