Selaa lähdekoodia

[csharp] Fix events firing during mix out.

Based on https://github.com/EsotericSoftware/spine-runtimes/commit/2a7fd54224e53d73ae303bed480bdac10bacd838
John 7 vuotta sitten
vanhempi
commit
9589d4225e
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 3 2
      spine-csharp/src/AnimationState.cs

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

@@ -138,6 +138,9 @@ namespace Spine {
 
 			bool finished = UpdateMixingFrom(from, delta);
 
+			from.animationLast = from.nextAnimationLast;
+			from.trackLast = from.nextTrackLast;
+
 			// Require mixTime > 0 to ensure the mixing from entry was applied at least once.
 			if (to.mixTime > 0 && (to.mixTime >= to.mixDuration || to.timeScale == 0)) {
 				// Require totalAlpha == 0 to ensure mixing is complete, unless mixDuration == 0 (the transition is a single frame).
@@ -149,8 +152,6 @@ namespace Spine {
 				return finished;
 			}
 
-			from.animationLast = from.nextAnimationLast;
-			from.trackLast = from.nextTrackLast;
 			from.trackTime += delta * from.timeScale;
 			to.mixTime += delta * to.timeScale;
 			return false;