Quellcode durchsuchen

Merge branch 'dev' of https://github.com/esotericsoftware/spine-runtimes into dev

badlogic vor 9 Jahren
Ursprung
Commit
6c10b256ca

+ 1 - 2
spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Animation.java

@@ -693,8 +693,7 @@ public class Animation {
 				frameIndex = binarySearch(frames, time, 1) - 1;
 
 			String attachmentName = attachmentNames[frameIndex];
-			skeleton.slots.get(slotIndex)
-				.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slotIndex, attachmentName));
+			slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slotIndex, attachmentName));
 		}
 	}
 

+ 5 - 3
spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java

@@ -248,10 +248,12 @@ public class AnimationState {
 		}
 
 		RotateTimeline rotateTimeline = (RotateTimeline)timeline;
-		float[] frames = rotateTimeline.frames;
-		if (time < frames[0]) return; // Time is before first frame.
-
 		Bone bone = skeleton.bones.get(rotateTimeline.boneIndex);
+		float[] frames = rotateTimeline.frames;
+		if (time < frames[0]) { // Time is before first frame.
+			if (setupPose) bone.rotation = bone.data.rotation;
+			return;
+		}
 
 		float r2;
 		if (time >= frames[frames.length - ENTRIES]) // Time is after last frame.