By clamping the value for current_frame to the active tag's frame range, we can allow systems to directly manipulate the tag field on an Animation component without causing the animation playback to cover frames that are outside the range for the given tag.
Not ideal, but partially solves https://github.com/Lommix/bevy_aseprite_ultra/issues/3
By clamping the value for current_frame to the active tag's frame range, we can allow systems to directly manipulate the
tag
field on anAnimation
component without causing the animation playback to cover frames that are outside the range for the given tag.This is a more conservative fix than I first hacked together (cf. https://github.com/Lommix/bevy_aseprite_ultra/issues/3#issuecomment-2106128700).
Still not great. At the very least it saves from leaking
AnimationState
which can now stay private.