From d0d22bb344989d0166ff03e32aedbd50f3279f0b Mon Sep 17 00:00:00 2001 From: NathanSweet Date: Wed, 17 Oct 2018 11:23:44 +0200 Subject: [PATCH] [libgdx] AnimationState javadoc. --- .../spine/AnimationState.java | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java index 2d4a1ec6d..76d1a1daa 100644 --- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java @@ -534,9 +534,10 @@ public class AnimationState { /** Adds an animation to be played after the current or last queued animation for a track. If the track is empty, it is * equivalent to calling {@link #setAnimation(int, Animation, boolean)}. - * @param delay Seconds to begin this animation after the start of the previous animation. If <= 0, uses the duration of the - * previous track entry minus any mix duration plus the specified delay. If the previous entry is - * looping, its next loop completion is used instead of the duration. + * @param delay If > 0, sets {@link TrackEntry#getDelay()}. If <= 0, the delay set is the duration of the previous track entry + * minus any mix duration plus the specified delay (ie the mix ends at (delay = 0) or + * before (delay < 0) the previous track entry duration). If the previous entry is looping, its next + * loop completion is used instead of its duration. * @return A track entry to allow further customization of animation playback. References to the track entry must not be kept * after the {@link AnimationStateListener#dispose(TrackEntry)} event occurs. */ public TrackEntry addAnimation (int trackIndex, Animation animation, boolean loop, float delay) { @@ -598,9 +599,10 @@ public class AnimationState { * {@link #setEmptyAnimation(int, float)}. *

* See {@link #setEmptyAnimation(int, float)}. - * @param delay Seconds to begin this animation after the start of the previous animation. If <= 0, uses the duration of the - * previous track entry minus any mix duration plus the specified delay. If the previous entry is - * looping, its next loop completion is used instead of the duration. + * @param delay If > 0, sets {@link TrackEntry#getDelay()}. If <= 0, the delay set is the duration of the previous track entry + * minus any mix duration plus the specified delay (ie the mix ends at (delay = 0) or + * before (delay < 0) the previous track entry duration). If the previous entry is looping, its next + * loop completion is used instead of its duration. * @return A track entry to allow further customization of animation playback. References to the track entry must not be kept * after the {@link AnimationStateListener#dispose(TrackEntry)} event occurs. */ public TrackEntry addEmptyAnimation (int trackIndex, float mixDuration, float delay) { @@ -859,9 +861,10 @@ public class AnimationState { this.loop = loop; } - /** Seconds to postpone playing the animation. When a track entry is the current track entry, delay postpones - * incrementing the {@link #getTrackTime()}. When a track entry is queued, delay is the time from the start of - * the previous animation to when the track entry will become the current track entry. */ + /** Seconds to postpone playing the animation. When this track entry is the current track entry, delay + * postpones incrementing the {@link #getTrackTime()}. When this track entry is queued, delay is the time from + * the start of the previous animation to when this track entry will become the current track entry (ie when the previous + * track entry {@link TrackEntry#getTrackTime()} >= this track entry's delay). */ public float getDelay () { return delay; }