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 Details

    • setGui

      void setGui(Gui gui)
      Sets the Gui this Animation will take place in.
      Parameters:
      gui - The Gui this Animation will take place in
    • setWindows

      void setWindows(@NotNull @NotNull List<Window> windows)
      Sets the Windows that will see this animation. Useful for playing sounds in a showHandler. (addShowHandler(BiConsumer))
      Parameters:
      windows - The Windows that will see this animation
    • setSlots

      void setSlots(List<Integer> slots)
      Sets the slots that should be shown.
      Parameters:
      slots - The slots that should be shown.
    • addShowHandler

      void addShowHandler(@NotNull @NotNull BiConsumer<Integer,Integer> show)
      Adds a show handler. Can be used to for example play a sound when a slot pops up.
      Parameters:
      show - The show handler as a BiConsumer consisting of frame number (first int) and slot index to show (second int).
    • addFinishHandler

      void addFinishHandler(@NotNull @NotNull Runnable finish)
      Adds a Runnable that should run after the Animation is finished.
      Parameters:
      finish - The Runnable that should run after the Animation is finished.
    • start

      void start()
      Starts the Animation.
    • cancel

      void cancel()
      Cancels the Animation.