Class ClockAnimationComponent
java.lang.Object
nl.pim16aap2.animatedarchitecture.structures.drawbridge.DrawbridgeAnimationComponent
nl.pim16aap2.animatedarchitecture.structures.clock.ClockAnimationComponent
- All Implemented Interfaces:
IAnimationComponent
-
Constructor Summary
ConstructorsConstructorDescriptionClockAnimationComponent(AnimationRequestData data, MovementDirection movementDirection, boolean isNorthSouthAligned) -
Method Summary
Modifier and TypeMethodDescriptionvoidexecuteAnimationStep(IAnimator animator, Iterable<IAnimatedBlock> animatedBlocks, int ticks) Runs a single step of the animation.@Nullable Consumer<IAnimatedBlockData> Provides the consumer that applies the rotation to theIAnimatedBlockData.getFinalPosition(int xAxis, int yAxis, int zAxis) Calculates the final position from the original coordinates of the block that will be animated.Methods inherited from class nl.pim16aap2.animatedarchitecture.structures.drawbridge.DrawbridgeAnimationComponent
getGoalPos, getGoalPos, getGoalRotation, getRadius, getRadius, getStartPositionMethods 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
prepareAnimation
-
Constructor Details
-
ClockAnimationComponent
public ClockAnimationComponent(AnimationRequestData data, MovementDirection movementDirection, boolean isNorthSouthAligned)
-
-
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- Overrides:
getFinalPositionin classDrawbridgeAnimationComponent- 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.
-
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- Overrides:
executeAnimationStepin classDrawbridgeAnimationComponent- 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.
-
getBlockDataRotator
Description copied from interface:IAnimationComponentProvides the consumer that applies the rotation to theIAnimatedBlockData.When set to null (the default value), it does not do anything.
- Specified by:
getBlockDataRotatorin interfaceIAnimationComponent- Overrides:
getBlockDataRotatorin classDrawbridgeAnimationComponent- Returns:
- The rotation function for the animated block data.
-