瀏覽代碼

DrawOrderTimeline now uses setup pose before first key when applying the first animations (track 0, not layered).

This matches behavior of non-instant timelines (rotate, translate, etc) and AttachmentTimeline (just changed, see 82d3dd80e174f4c70c9ab81766043c3d76abd560).
NathanSweet 7 年之前
父節點
當前提交
6b97f44338
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Animation.java

+ 3 - 3
spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Animation.java

@@ -167,8 +167,8 @@ public class Animation {
 		 * value is set. */
 		 * value is set. */
 		setup,
 		setup,
 		/** Transitions from the current value to the timeline value. Before the first key, transitions from the current value to
 		/** Transitions from the current value to the timeline value. Before the first key, transitions from the current value to
-		 * the setup value, except for timelines which perform instant transitions, such as {@link DrawOrderTimeline} or
-		 * {@link AttachmentTimeline}.
+		 * the setup value. Timelines which perform instant transitions, such as {@link DrawOrderTimeline} or
+		 * {@link AttachmentTimeline}, use the setup value before the first key.
 		 * <p>
 		 * <p>
 		 * <code>first</code> is intended for the first animations applied, not for animations layered on top of those. */
 		 * <code>first</code> is intended for the first animations applied, not for animations layered on top of those. */
 		first,
 		first,
@@ -1274,7 +1274,7 @@ public class Animation {
 
 
 			float[] frames = this.frames;
 			float[] frames = this.frames;
 			if (time < frames[0]) { // Time is before first frame.
 			if (time < frames[0]) { // Time is before first frame.
-				if (blend == setup) System.arraycopy(slots.items, 0, drawOrder.items, 0, slots.size);
+				if (blend == setup || blend == first) System.arraycopy(slots.items, 0, drawOrder.items, 0, slots.size);
 				return;
 				return;
 			}
 			}