소스 검색

[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;