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 TypeMethodDescriptionvoid
addFinishHandler
(@NotNull Runnable finish) void
addShowHandler
(@NotNull BiConsumer<Integer, Integer> show) Adds a show handler.void
cancel()
Cancels theAnimation
.void
void
Sets the slots that should be shown.void
setWindows
(@NotNull List<Window> windows) Sets theWindow
s that will see this animation.void
start()
Starts theAnimation
.
-
Method Details
-
setGui
-
setWindows
Sets theWindow
s that will see this animation. Useful for playing sounds in a showHandler. (addShowHandler(BiConsumer)
)- Parameters:
windows
- TheWindow
s 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 aBiConsumer
consisting of frame number (first int) and slot index to show (second int).
-
addFinishHandler
-
start
void start()Starts theAnimation
. -
cancel
void cancel()Cancels theAnimation
.
-