39 if (m_ActiveSequence) {
41 auto& [anim, params] = m_AnimationSequence[m_CurrentLoopedSequenceIndex];
42 if (m_CurrentFrame == anim.m_Pack->m_Animations[anim.m_AnimationID].m_Frames.size() - 1 && m_CurrentFrameTick >= anim.m_Pack->m_Animations[anim.m_AnimationID].m_Frames[m_CurrentFrame].m_TickDuration) {
43 if (m_CurrentLoopedSequenceIndex == m_AnimationSequence.size() - 1) {
44 if (m_LoopStartIndex != 0xFFFF) {
45 m_CurrentLoopedSequenceIndex = m_LoopStartIndex;
47 m_CurrentFrameTick = 1;
51 m_CurrentFrameTick = 1;
59 ++m_CurrentLoopedSequenceIndex;
61 m_CurrentFrameTick = 1;
65 if (m_CurrentFrameTick < anim.m_Pack->m_Animations[anim.m_AnimationID].m_Frames[m_CurrentFrame].m_TickDuration) {
69 m_CurrentFrameTick = 1;
75 const auto& [pack, id] = m_AnimationSequence[m_CurrentLoopedSequenceIndex].first;
76 const auto& m_UVs= pack->m_Animations[id].m_Frames[m_CurrentFrame].m_UVs;
78 const glm::vec2 animationFrameSize = pack->m_Animations[id].m_FrameSize;
79 if (animationFrameSize != glm::vec2{std::numeric_limits<float>::max(), std::numeric_limits<float>::max()}) {
80 renderer.m_HalfSize = animationFrameSize * m_SizeScale / 2.0f;
84 renderer.m_Texture = std::get<std::shared_ptr<Graphics::SpriteAtlas>>(pack->m_TextureOrAtlas)->GetTexture();
86 renderer.m_Texture = std::get<std::shared_ptr<Graphics::Texture2D>>(pack->m_TextureOrAtlas);
89 renderer.m_UVs = m_UVs;