浏览代码

[as3] Fix for #1290, do not carry over time when timeScale of a track entry taht's being replaced by a new one is 0.

badlogic 6 年之前
父节点
当前提交
57e38a0cb3

二进制
spine-as3/spine-as3-example/lib/spine-as3.swc


+ 1 - 1
spine-as3/spine-as3/src/spine/animation/AnimationState.as

@@ -90,7 +90,7 @@ package spine.animation {
 					var nextTime : Number = current.trackLast - next.delay;
 					if (nextTime >= 0) {
 						next.delay = 0;
-						next.trackTime = (nextTime / current.timeScale + delta) * next.timeScale;
+						next.trackTime = current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;
 						current.trackTime += currentDelta;
 						setCurrent(i, next, true);
 						while (next.mixingFrom != null) {

二进制
spine-starling/spine-starling-example/lib/spine-as3.swc


二进制
spine-starling/spine-starling/lib/spine-as3.swc