From bb921a6dc71d79f4670adcba3699dc93ab509a48 Mon Sep 17 00:00:00 2001 From: Lennert Claeys Date: Fri, 1 Nov 2024 19:36:34 +0100 Subject: [PATCH] Stop animation before changing to a new one --- src/graphics/animator.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/graphics/animator.ts b/src/graphics/animator.ts index 5e7361c..b1ed331 100644 --- a/src/graphics/animator.ts +++ b/src/graphics/animator.ts @@ -91,6 +91,8 @@ export class Animator { oldConfig.onEnd(this.self); } + this.sprite.stop(); + this.time = 0; this.nextTime = 0; this.completeTime = config.duration || 0;