Skip to content

Commit

Permalink
Stop animation before changing to a new one
Browse files Browse the repository at this point in the history
  • Loading branch information
lorgan3 committed Nov 1, 2024
1 parent 921c644 commit bb921a6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/graphics/animator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ export class Animator<K extends string = string, S = any> {
oldConfig.onEnd(this.self);
}

this.sprite.stop();

this.time = 0;
this.nextTime = 0;
this.completeTime = config.duration || 0;
Expand Down

0 comments on commit bb921a6

Please sign in to comment.