Class SlidingDoorAnimationComponent
java.lang.Object
nl.pim16aap2.animatedarchitecture.structures.slidingdoor.SlidingDoorAnimationComponent
- All Implemented Interfaces:
IAnimationComponent
Represents a
Animator for SlidingDoor.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSlidingDoorAnimationComponent(AnimationRequestData data, MovementDirection movementDirection, int blocksToMove) -
Method Summary
Modifier and TypeMethodDescriptionvoidexecuteAnimationStep(IAnimator animator, Iterable<IAnimatedBlock> animatedBlocks, int ticks) Runs a single step of the animation.getFinalPosition(int xAxis, int yAxis, int zAxis) Calculates the final position from the original coordinates of the block that will be animated.protected RotatedPositiongetGoalPos(IAnimatedBlock animatedBlock, double stepSum) voidprepareAnimation(IAnimator animator) Runs some optional steps before the animation is started.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface nl.pim16aap2.animatedarchitecture.core.animation.IAnimationComponent
getBlockDataRotator, getRadius, getStartPosition
-
Field Details
-
blocksToMove
protected final int blocksToMove -
snapshot
-
-
Constructor Details
-
SlidingDoorAnimationComponent
public SlidingDoorAnimationComponent(AnimationRequestData data, MovementDirection movementDirection, int blocksToMove)
-
-
Method Details
-
getFinalPosition
Description copied from interface:IAnimationComponentCalculates the final position from the original coordinates of the block that will be animated.- Specified by:
getFinalPositionin interfaceIAnimationComponent- 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
Description copied from interface:IAnimationComponentRuns some optional steps before the animation is started.- Specified by:
prepareAnimationin interfaceIAnimationComponent- Parameters:
animator- The animator responsible for the animation.
-
getGoalPos
-
executeAnimationStep
public void executeAnimationStep(IAnimator animator, Iterable<IAnimatedBlock> animatedBlocks, int ticks) Description copied from interface:IAnimationComponentRuns a single step of the animation.- Specified by:
executeAnimationStepin interfaceIAnimationComponent- 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.
-