Ver Fonte

[haxe] Fix AnimationState complete event bad porting from 88b009c

Davide Tantillo há 1 ano atrás
pai
commit
ed75b2eb61

+ 1 - 1
spine-haxe/spine-haxe/spine/animation/AnimationState.hx

@@ -465,7 +465,7 @@ class AnimationState {
 				complete = true;
 			else {
 				var cycles:Float = Math.floor(entry.trackTime / duration);
-				complete = cycles > 0 && cycles > Math.floor(entry.trackTime / duration);
+				complete = cycles > 0 && cycles > Math.floor(entry.trackLast / duration);
 			}
 		} else
 			complete = animationTime >= animationEnd && entry.animationLast < animationEnd;

+ 1 - 1
spine-haxe/spine-haxe/spine/starling/SkeletonSprite.hx

@@ -327,7 +327,7 @@ class SkeletonSprite extends DisplayObject implements IAnimatable {
 		var steps = 100, time = 0.;
 		var stepTime = animation.duration != 0 ? animation.duration / steps : 0;
 		var minX = 100000000., maxX = -100000000., minY = 100000000., maxY = -100000000.;
-		
+
 		var bound:lime.math.Rectangle;
 		for (i in 0...steps) {
 			animation.apply(_skeleton, time , time, false, [], 1, MixBlend.setup, MixDirection.mixIn);