소스 검색

[csharp] Last minute fix to AnimationState#applyRotateTimeline

badlogic 9 년 전
부모
커밋
fcb878081c
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      spine-csharp/src/AnimationState.cs

+ 4 - 1
spine-csharp/src/AnimationState.cs

@@ -251,9 +251,12 @@ namespace Spine {
 			}
 
 			float[] frames = rotateTimeline.frames;
-			if (time < frames[0]) return; // Time is before first frame.
 
 			Bone bone = skeleton.bones.Items[rotateTimeline.boneIndex];
+			if (time < frames[0]) {
+				if (setupPose) bone.rotation = bone.data.rotation;
+				return;
+			}
 
 			float r2;
 			if (time >= frames[frames.Length - RotateTimeline.ENTRIES]) // Time is after last frame.