解决动画不切换问题

This commit is contained in:
2025-06-02 20:38:13 +08:00
parent 3fbfc2ea09
commit 4585ee59d6

View File

@@ -24,7 +24,7 @@ export default class HeroAnmComp extends Component{
spine.setCompleteListener((trackEntry) => {
var animationName = trackEntry.animation ? trackEntry.animation.name : "";
if (animationName === 'Attacking'||animationName==='Taunt'||animationName==='Hurt') {
// this.spine!.clearTrack(1);
this.spine!.clearTrack(1);
}
var loopCount = Math.floor(trackEntry.trackTime / trackEntry.animationEnd);
// console.log("[track %s][animation %s] complete: %s", trackEntry.trackIndex, animationName, loopCount);