Class SlidingDoorAnimationComponent

java.lang.Object
nl.pim16aap2.animatedarchitecture.structures.slidingdoor.SlidingDoorAnimationComponent
All Implemented Interfaces:
IAnimationComponent

public class SlidingDoorAnimationComponent extends Object implements IAnimationComponent
Represents a Animator for SlidingDoor.
  • Field Details

    • blocksToMove

      protected final int blocksToMove
    • snapshot

      protected final StructureSnapshot snapshot
  • Constructor Details

  • Method Details

    • getFinalPosition

      public RotatedPosition getFinalPosition(int xAxis, int yAxis, int zAxis)
      Description copied from interface: IAnimationComponent
      Calculates the final position from the original coordinates of the block that will be animated.
      Specified by:
      getFinalPosition in interface IAnimationComponent
      Parameters:
      xAxis - The x-coordinate of the original location of the block.
      yAxis - The y-coordinate of the original location of the block.
      zAxis - The z-coordinate of the original location of the block.
      Returns:
      The final position of an IAnimatedBlock.
    • prepareAnimation

      public void prepareAnimation(IAnimator animator)
      Description copied from interface: IAnimationComponent
      Runs some optional steps before the animation is started.
      Specified by:
      prepareAnimation in interface IAnimationComponent
      Parameters:
      animator - The animator responsible for the animation.
    • getGoalPos

      protected RotatedPosition getGoalPos(IAnimatedBlock animatedBlock, double stepSum)
    • executeAnimationStep

      public void executeAnimationStep(IAnimator animator, Iterable<IAnimatedBlock> animatedBlocks, int ticks)
      Description copied from interface: IAnimationComponent
      Runs a single step of the animation.
      Specified by:
      executeAnimationStep in interface IAnimationComponent
      Parameters:
      animator - The animator responsible for the animation.
      animatedBlocks - The animated blocks for which to execute the animation step.
      ticks - The number of ticks that have passed since the start of the animation.