From 117b76bb35de954a1912c34a6ae71229b6632d38 Mon Sep 17 00:00:00 2001 From: "jiaxin.lai" Date: Thu, 18 Jul 2019 14:20:42 +0800 Subject: [PATCH] Fix bug of samepleEvents in animation-state.ts (#4909) --- cocos/animation/animation-state.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/cocos/animation/animation-state.ts b/cocos/animation/animation-state.ts index 5c1fab951ee..3fb0b204488 100644 --- a/cocos/animation/animation-state.ts +++ b/cocos/animation/animation-state.ts @@ -652,6 +652,7 @@ export class AnimationState extends Playable { } private _sampleEvents (wrapInfo: WrappedInfo) { + const length = this._clip.eventGroups.length; let direction = wrapInfo.direction; let eventIndex = this._clip.getEventGroupIndexAtRatio(wrapInfo.ratio); if (eventIndex < 0) {