Class AnimationContext

java.lang.Object
nl.pim16aap2.animatedarchitecture.core.api.animatedblock.AnimationContext

public final class AnimationContext extends Object
Contains the context in which an animation takes place. For example, the structure that is being animated.
  • Constructor Details

    • AnimationContext

      public AnimationContext(StructureType structureType, StructureSnapshot structureSnapshot, Animation<? extends IAnimatedBlock> animation)
      Creates a new AnimationContext instance.
      Parameters:
      structureType - The type of structure being animated.
      structureSnapshot - A snapshot of the structure being animated, created before the movement started.
      animation - The current progress of the animation.
  • Method Details

    • getStructureType

      public StructureType getStructureType()
      The type of structure being animated.
    • getStructureSnapshot

      public StructureSnapshot getStructureSnapshot()
      A snapshot of the structure being animated, created before the movement started.
    • getAnimation

      public Animation<? extends IAnimatedBlock> getAnimation()
      The current progress of the animation.
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public @NonNull String toString()
      Overrides:
      toString in class Object