浏览代码

[libgdx] Added TrackEntry#isNextReady().

closes #2540
Nathan Sweet 1 年之前
父节点
当前提交
c2fe1a3d77
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java

+ 6 - 0
spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java

@@ -1156,6 +1156,12 @@ public class AnimationState {
 			return nextTrackLast != -1;
 			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.
 		/** Returns true if at least one loop has been completed.
 		 * <p>
 		 * <p>
 		 * See {@link AnimationStateListener#complete(TrackEntry)}. */
 		 * See {@link AnimationStateListener#complete(TrackEntry)}. */