fix: Fix texture atlases looping indefinitely

This commit is contained in:
Abnormal 2025-04-04 17:30:17 -05:00
parent d31ef12363
commit ef7c9afd14

View file

@ -66,6 +66,8 @@ class FlxAtlasSprite extends FlxAnimate
throw 'FlxAtlasSprite not initialized properly. Are you sure the path (${path}) exists?';
}
onAnimationComplete.add(cleanupAnimation);
// This defaults the sprite to play the first animation in the atlas,
// then pauses it. This ensures symbols are intialized properly.
this.anim.play('');