From d3710b59988f334e68c68fbe9101dc5c108e656e Mon Sep 17 00:00:00 2001 From: qlli Date: Tue, 10 Sep 2024 16:43:54 +0800 Subject: [PATCH] fix: Die behavior with animation #315 --- sprite.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sprite.go b/sprite.go index 7482bab..ab32490 100644 --- a/sprite.go +++ b/sprite.go @@ -488,6 +488,8 @@ func (p *Sprite) OnTurning__1(onTurning func()) { func (p *Sprite) Die() { aniName := p.getStateAnimName(StateDie) p.SetDying() + + p.Stop(OtherScriptsInSprite) if ani, ok := p.animations[aniName]; ok { p.goAnimate(aniName, ani) }