瀏覽代碼

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

Davide Tantillo 1 年之前
父節點
當前提交
f0fbceb6f7
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      spine-ts/spine-core/src/AnimationState.ts

+ 1 - 1
spine-ts/spine-core/src/AnimationState.ts

@@ -441,7 +441,7 @@ export class AnimationState {
 				complete = true;
 			else {
 				const cycles = 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;