Record Class CachedAnimation

java.lang.Object
java.lang.Record
dev.gothickit.zenkit.mds.CachedAnimation
All Implemented Interfaces:
CacheableObject<CachedAnimation>, Animation

public record CachedAnimation(@NotNull String name, int layer, @NotNull String next, float blendIn, float blendOut, EnumSet<AnimationFlag> flags, @NotNull String model, @NotNull AnimationDirection direction, int firstFrame, int lastFrame, float fps, float speed, float collisionVolumeScale, @NotNull List<@NotNull EventTag> eventTags, @NotNull List<@NotNull EventParticleEffect> particleEffects, @NotNull List<@NotNull EventParticleEffectStop> particleEffectsStop, @NotNull List<@NotNull EventSoundEffect> soundEffects, @NotNull List<@NotNull EventSoundEffectGround> soundEffectsGround, @NotNull List<@NotNull EventMorphAnimation> morphAnimations, @NotNull List<@NotNull EventCameraTremor> cameraTremors) extends Record implements Animation
  • Constructor Details

    • CachedAnimation

      public CachedAnimation(@NotNull @NotNull String name, int layer, @NotNull @NotNull String next, float blendIn, float blendOut, EnumSet<AnimationFlag> flags, @NotNull @NotNull String model, @NotNull @NotNull AnimationDirection direction, int firstFrame, int lastFrame, float fps, float speed, float collisionVolumeScale, @NotNull @NotNull List<@NotNull EventTag> eventTags, @NotNull @NotNull List<@NotNull EventParticleEffect> particleEffects, @NotNull @NotNull List<@NotNull EventParticleEffectStop> particleEffectsStop, @NotNull @NotNull List<@NotNull EventSoundEffect> soundEffects, @NotNull @NotNull List<@NotNull EventSoundEffectGround> soundEffectsGround, @NotNull @NotNull List<@NotNull EventMorphAnimation> morphAnimations, @NotNull @NotNull List<@NotNull EventCameraTremor> cameraTremors)
      Creates an instance of a CachedAnimation record class.
      Parameters:
      name - the value for the name record component
      layer - the value for the layer record component
      next - the value for the next record component
      blendIn - the value for the blendIn record component
      blendOut - the value for the blendOut record component
      flags - the value for the flags record component
      model - the value for the model record component
      direction - the value for the direction record component
      firstFrame - the value for the firstFrame record component
      lastFrame - the value for the lastFrame record component
      fps - the value for the fps record component
      speed - the value for the speed record component
      collisionVolumeScale - the value for the collisionVolumeScale record component
      eventTags - the value for the eventTags record component
      particleEffects - the value for the particleEffects record component
      particleEffectsStop - the value for the particleEffectsStop record component
      soundEffects - the value for the soundEffects record component
      soundEffectsGround - the value for the soundEffectsGround record component
      morphAnimations - the value for the morphAnimations record component
      cameraTremors - the value for the cameraTremors record component
  • Method Details

    • eventTagCount

      public long eventTagCount()
      Specified by:
      eventTagCount in interface Animation
    • particleEffectCount

      public long particleEffectCount()
      Specified by:
      particleEffectCount in interface Animation
    • particleEffectStopCount

      public long particleEffectStopCount()
      Specified by:
      particleEffectStopCount in interface Animation
    • soundEffectCount

      public long soundEffectCount()
      Specified by:
      soundEffectCount in interface Animation
    • soundEffectGroundCount

      public long soundEffectGroundCount()
      Specified by:
      soundEffectGroundCount in interface Animation
    • morphAnimationCount

      public long morphAnimationCount()
      Specified by:
      morphAnimationCount in interface Animation
    • cameraTremorCount

      public long cameraTremorCount()
      Specified by:
      cameraTremorCount in interface Animation
    • eventTag

      @Nullable public @Nullable EventTag eventTag(long i)
      Specified by:
      eventTag in interface Animation
    • particleEffect

      @Nullable public @Nullable EventParticleEffect particleEffect(long i)
      Specified by:
      particleEffect in interface Animation
    • particleEffectStop

      @Nullable public @Nullable EventParticleEffectStop particleEffectStop(long i)
      Specified by:
      particleEffectStop in interface Animation
    • soundEffect

      @Nullable public @Nullable EventSoundEffect soundEffect(long i)
      Specified by:
      soundEffect in interface Animation
    • soundEffectGround

      @Nullable public @Nullable EventSoundEffectGround soundEffectGround(long i)
      Specified by:
      soundEffectGround in interface Animation
    • morphAnimation

      @Nullable public @Nullable EventMorphAnimation morphAnimation(long i)
      Specified by:
      morphAnimation in interface Animation
    • cameraTremor

      @Nullable public @Nullable EventCameraTremor cameraTremor(long i)
      Specified by:
      cameraTremor in interface Animation
    • cache

      @NotNull public @NotNull CachedAnimation cache()
      Specified by:
      cache in interface CacheableObject<CachedAnimation>
    • isCached

      public boolean isCached()
      Specified by:
      isCached in interface CacheableObject<CachedAnimation>
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      @NotNull public @NotNull String name()
      Returns the value of the name record component.
      Specified by:
      name in interface Animation
      Returns:
      the value of the name record component
    • layer

      public int layer()
      Returns the value of the layer record component.
      Specified by:
      layer in interface Animation
      Returns:
      the value of the layer record component
    • next

      @NotNull public @NotNull String next()
      Returns the value of the next record component.
      Specified by:
      next in interface Animation
      Returns:
      the value of the next record component
    • blendIn

      public float blendIn()
      Returns the value of the blendIn record component.
      Specified by:
      blendIn in interface Animation
      Returns:
      the value of the blendIn record component
    • blendOut

      public float blendOut()
      Returns the value of the blendOut record component.
      Specified by:
      blendOut in interface Animation
      Returns:
      the value of the blendOut record component
    • flags

      public EnumSet<AnimationFlag> flags()
      Returns the value of the flags record component.
      Specified by:
      flags in interface Animation
      Returns:
      the value of the flags record component
    • model

      @NotNull public @NotNull String model()
      Returns the value of the model record component.
      Specified by:
      model in interface Animation
      Returns:
      the value of the model record component
    • direction

      @NotNull public @NotNull AnimationDirection direction()
      Returns the value of the direction record component.
      Specified by:
      direction in interface Animation
      Returns:
      the value of the direction record component
    • firstFrame

      public int firstFrame()
      Returns the value of the firstFrame record component.
      Specified by:
      firstFrame in interface Animation
      Returns:
      the value of the firstFrame record component
    • lastFrame

      public int lastFrame()
      Returns the value of the lastFrame record component.
      Specified by:
      lastFrame in interface Animation
      Returns:
      the value of the lastFrame record component
    • fps

      public float fps()
      Returns the value of the fps record component.
      Specified by:
      fps in interface Animation
      Returns:
      the value of the fps record component
    • speed

      public float speed()
      Returns the value of the speed record component.
      Specified by:
      speed in interface Animation
      Returns:
      the value of the speed record component
    • collisionVolumeScale

      public float collisionVolumeScale()
      Returns the value of the collisionVolumeScale record component.
      Specified by:
      collisionVolumeScale in interface Animation
      Returns:
      the value of the collisionVolumeScale record component
    • eventTags

      @NotNull public @NotNull List<@NotNull EventTag> eventTags()
      Returns the value of the eventTags record component.
      Specified by:
      eventTags in interface Animation
      Returns:
      the value of the eventTags record component
    • particleEffects

      @NotNull public @NotNull List<@NotNull EventParticleEffect> particleEffects()
      Returns the value of the particleEffects record component.
      Specified by:
      particleEffects in interface Animation
      Returns:
      the value of the particleEffects record component
    • particleEffectsStop

      @NotNull public @NotNull List<@NotNull EventParticleEffectStop> particleEffectsStop()
      Returns the value of the particleEffectsStop record component.
      Specified by:
      particleEffectsStop in interface Animation
      Returns:
      the value of the particleEffectsStop record component
    • soundEffects

      @NotNull public @NotNull List<@NotNull EventSoundEffect> soundEffects()
      Returns the value of the soundEffects record component.
      Specified by:
      soundEffects in interface Animation
      Returns:
      the value of the soundEffects record component
    • soundEffectsGround

      @NotNull public @NotNull List<@NotNull EventSoundEffectGround> soundEffectsGround()
      Returns the value of the soundEffectsGround record component.
      Specified by:
      soundEffectsGround in interface Animation
      Returns:
      the value of the soundEffectsGround record component
    • morphAnimations

      @NotNull public @NotNull List<@NotNull EventMorphAnimation> morphAnimations()
      Returns the value of the morphAnimations record component.
      Specified by:
      morphAnimations in interface Animation
      Returns:
      the value of the morphAnimations record component
    • cameraTremors

      @NotNull public @NotNull List<@NotNull EventCameraTremor> cameraTremors()
      Returns the value of the cameraTremors record component.
      Specified by:
      cameraTremors in interface Animation
      Returns:
      the value of the cameraTremors record component