[libgdx] Added TrackEntry#isNextReady().

closes #2540
This commit is contained in:
Nathan Sweet 2024-06-06 16:34:23 -04:00
parent a0caef69f5
commit c2fe1a3d77

View File

@ -1156,6 +1156,12 @@ public class AnimationState {
return nextTrackLast != -1;
}
/** Returns true if there is a {@link #getNext()} track entry that is ready to become the current track entry during the
* next {@link AnimationState#update(float)}. */
public boolean isNextReady () {
return next != null && nextTrackLast - next.delay >= 0;
}
/** Returns true if at least one loop has been completed.
* <p>
* See {@link AnimationStateListener#complete(TrackEntry)}. */