Class HorizontalSnakeAnimation
java.lang.Object
xyz.xenondevs.invui.animation.impl.AbstractAnimation
xyz.xenondevs.invui.animation.impl.AbstractSoundAnimation
xyz.xenondevs.invui.animation.impl.HorizontalSnakeAnimation
- All Implemented Interfaces:
Animation
An animation that moves like a snake in horizontal direction,
starting from (0,0) then moving all the way right, one down,
all the way left and repeat.
-
Constructor Summary
ConstructorDescriptionHorizontalSnakeAnimation
(int tickDelay, boolean sound) Creates a newHorizontalSnakeAnimation
. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
handleFrame
(int frame) Handles the next frame of theAnimation
.Methods inherited from class xyz.xenondevs.invui.animation.impl.AbstractAnimation
addFinishHandler, addShowHandler, cancel, convToIndex, finish, getCurrentViewers, getHeight, getSlots, getWidth, setGui, setSlots, setWindows, show, start
-
Constructor Details
-
HorizontalSnakeAnimation
public HorizontalSnakeAnimation(int tickDelay, boolean sound) Creates a newHorizontalSnakeAnimation
.- Parameters:
tickDelay
- The delay between each slot being shown.sound
- Whether a sound should be played when the slot is shown.
-
-
Method Details
-
handleFrame
protected void handleFrame(int frame) Description copied from class:AbstractAnimation
Handles the next frame of theAnimation
.- Specified by:
handleFrame
in classAbstractAnimation
- Parameters:
frame
- The current frame
-