Interface AnimationTransform
- All Known Implementing Classes:
AnchorAnimationTransform,AttachedAnimationTransform,BetweenAnimationTransform,MoveBetweenAnimationTransform,OrbitAnimationTransform
An AnimationTransform is responsible for applying per-tick spatial behaviour to
an ActiveBattleAnimation. Implementations may anchor an animation to a battle target,
move it between two positions, stretch it between the user and target, orbit it around an
entity, or perform any other transform-specific positioning logic.
Transforms are data-driven and dispatched through the animation transform registry using
AnimationTransformType. Each implementation provides its registered type via
type(), allowing CODEC to decode the correct transform from animation
data.
A transform usually mutates the entity state stored in the supplied
ActiveBattleAnimation, such as a modelled animation entity in the animation context.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidtick(ActiveBattleAnimation animation) Updates this transform for one animation tick.type()Gets the registered transform type for this implementation.
-
Field Details
-
CODEC
-
-
Method Details
-
type
AnimationTransformType<?> type()Gets the registered transform type for this implementation.This is used by
CODECto dispatch to the correct implementation-specific codec when decoding data-driven animation definitions.- Returns:
- the registered animation transform type
-
tick
Updates this transform for one animation tick.Implementations should use this method to update the active animation's position, rotation, scale, or any other transform-related state.
- Parameters:
animation- the active battle animation being transformed
-