Enum Class AnimationIterator.Type

java.lang.Object
java.lang.Enum<AnimationIterator.Type>
kr.toxicity.model.api.animation.AnimationIterator.Type
All Implemented Interfaces:
Serializable, Comparable<AnimationIterator.Type>, Constable
Enclosing interface:
AnimationIterator<T extends Timed>

public static enum AnimationIterator.Type extends Enum<AnimationIterator.Type>
Defines the behavior of the animation iterator.
Since:
1.15.2
  • Enum Constant Details

    • PLAY_ONCE

      @SerializedName("once") public static final AnimationIterator.Type PLAY_ONCE
      Plays the animation once and then stops.
      Since:
      1.15.2
    • LOOP

      @SerializedName("loop") public static final AnimationIterator.Type LOOP
      Loops the animation continuously.
      Since:
      1.15.2
    • HOLD_ON_LAST

      @SerializedName("hold") public static final AnimationIterator.Type HOLD_ON_LAST
      Plays the animation once and holds the last frame.
      Since:
      1.15.2
  • Method Details

    • values

      public static AnimationIterator.Type[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AnimationIterator.Type valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • create

      @NotNull public abstract <T extends Timed> @NotNull AnimationIterator<T> create(@NotNull @NotNull TimedStorage<T> keyframes)
      Creates a new iterator for the given keyframes based on this type.
      Type Parameters:
      T - the type of keyframe
      Parameters:
      keyframes - the keyframes to iterate over
      Returns:
      a new animation iterator
      Since:
      1.15.2