Эх сурвалжийг харах

[as3] Ported latest anim state change

badlogic 8 жил өмнө
parent
commit
8335ea6af7

BIN
spine-as3/spine-as3-example/lib/spine-as3.swc


+ 7 - 3
spine-as3/spine-as3/src/spine/animation/AnimationState.as

@@ -131,9 +131,13 @@ package spine.animation {
 
 
 			// Require mixTime > 0 to ensure the mixing from entry was applied at least once.
 			// Require mixTime > 0 to ensure the mixing from entry was applied at least once.
 			if (entry.mixTime > 0 && (entry.mixTime >= entry.mixDuration || entry.timeScale == 0)) {
 			if (entry.mixTime > 0 && (entry.mixTime >= entry.mixDuration || entry.timeScale == 0)) {
-				if (animationCount > 6 && from.mixingFrom == null) { // Limit the mixing from linked list.
-					entry.mixingFrom = null;
-					queue.end(from);
+				if (animationCount > 5 && from.mixingFrom == null) {
+					// Limit linked list by speeding up and removing old entries.
+					entry.interruptAlpha = Math.max(0, entry.interruptAlpha - delta * 0.66);
+					if (entry.interruptAlpha <= 0) {
+						entry.mixingFrom = null;
+						queue.end(from);
+					}
 				}
 				}
 				return finished;
 				return finished;
 			}
 			}

BIN
spine-starling/spine-starling-example/lib/spine-as3.swc


BIN
spine-starling/spine-starling/lib/spine-as3.swc