Package dev.triumphteam.gui.animations
Interface Animation
- All Known Implementing Classes:
BaseAnimation,InfiniteAnimation,SimpleAnimation
public interface Animation
-
Method Summary
Modifier and TypeMethodDescriptionintgetDelay()getGui()static @NotNull AnimationCreate a loop animation@Nullable FrameGo to the next framestatic @NotNull AnimationCreate a simple animation that stop at the end of the framesvoidreset()Reset to the initial framevoidStart the animationvoidstop()Stops the animation
-
Method Details
-
reset
void reset()Reset to the initial frame -
nextFrame
Go to the next frame- Returns:
- the next frame or null if it is the last frame
-
start
Start the animation- Parameters:
gui- The gui to apply the animation to
-
stop
void stop()Stops the animation -
getDelay
int getDelay()- Returns:
- the delay between frames
-
getRunnable
AnimationRunner getRunnable()- Returns:
- the bukkit runnable that handles frame updates
-
getGui
BaseGui getGui()- Returns:
- the gui that this animation is applyed to
-
of
Create a simple animation that stop at the end of the frames- Parameters:
delay- the delay between framesframes- the frames- Returns:
- the animation
-
infinite
Create a loop animation- Parameters:
delay- the delay between framesframes- the frames- Returns:
- the animation
-