Package xyz.xenondevs.invui.animation
Interface Animation
- All Known Implementing Classes:
AbstractAnimation,AbstractSoundAnimation,ColumnAnimation,HorizontalSnakeAnimation,RandomAnimation,RowAnimation,SequentialAnimation,SplitSequentialAnimation,VerticalSnakeAnimation
public interface Animation
Hides and shows slots in a
Gui in a specific order.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddFinishHandler(@NotNull Runnable finish) voidaddShowHandler(@NotNull BiConsumer<Integer, Integer> show) Adds a show handler.voidcancel()Cancels theAnimation.voidvoidSets the slots that should be shown.voidsetWindows(@NotNull List<Window> windows) Sets theWindows that will see this animation.voidstart()Starts theAnimation.
-
Method Details
-
setGui
-
setWindows
Sets theWindows that will see this animation. Useful for playing sounds in a showHandler. (addShowHandler(BiConsumer))- Parameters:
windows- TheWindows that will see this animation
-
setSlots
Sets the slots that should be shown.- Parameters:
slots- The slots that should be shown.
-
addShowHandler
Adds a show handler. Can be used to for example play a sound when a slot pops up.- Parameters:
show- The show handler as aBiConsumerconsisting of frame number (first int) and slot index to show (second int).
-
addFinishHandler
-
start
void start()Starts theAnimation. -
cancel
void cancel()Cancels theAnimation.
-