소스 검색

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

badlogic 7 년 전
부모
커밋
90554dff04
2개의 변경된 파일6개의 추가작업 그리고 6개의 파일을 삭제
  1. 3 3
      spine-csharp/src/AnimationState.cs
  2. 3 3
      spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java

+ 3 - 3
spine-csharp/src/AnimationState.cs

@@ -528,13 +528,13 @@ namespace Spine {
 					float duration = last.animationEnd - last.animationStart;
 					if (duration != 0) {
 						if (last.loop) {
-							delay += duration * (1 + (int)(last.trackTime / duration));
+							delay += duration * (1 + (int)(last.trackTime / duration)); // Completion of next loop.
 						} else {
-							delay += duration;
+							delay += Math.Max(duration, last.trackTime); // After duration, else next update.
 						}
 						delay -= data.GetMix(last.animation, animation);
 					} else
-						delay = 0;
+						delay = last.trackTime; // Next update.
 				}
 			}
 

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

@@ -544,12 +544,12 @@ public class AnimationState {
 				float duration = last.animationEnd - last.animationStart;
 				if (duration != 0) {
 					if (last.loop)
-						delay += duration * (1 + (int)(last.trackTime / duration));
+						delay += duration * (1 + (int)(last.trackTime / duration)); // Completion of next loop.
 					else
-						delay += duration;
+						delay += Math.max(duration, last.trackTime); // After duration, else next update.
 					delay -= data.getMix(last.animation, animation);
 				} else
-					delay = 0;
+					delay = last.trackTime; // Next update.
 			}
 		}