MCPcopy Create free account
hub / github.com/defold/defold / CompleteAnimation

Function CompleteAnimation

engine/gui/src/gui.cpp:1878–1901  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1876 }
1877
1878 static inline void CompleteAnimation(HScene scene, Animation* anim, bool finished)
1879 {
1880 if (!anim->m_AnimationCompleteCalled)
1881 {
1882 // NOTE: Very important to set m_AnimationCompleteCalled to 1
1883 // before invoking the call-back. The call-back could potentially
1884 // start a new animation that could reuse the same animation slot.
1885 anim->m_AnimationCompleteCalled = 1;
1886
1887 // NOTE: Very important to invoke the easing release callback for
1888 // the before calling animation complete. The animation
1889 // complete callback could start a new animation with an easing
1890 // curve that would be immediately released.
1891 if (anim->m_Easing.release_callback)
1892 {
1893 anim->m_Easing.release_callback(&anim->m_Easing);
1894 }
1895
1896 if (anim->m_AnimationComplete)
1897 {
1898 anim->m_AnimationComplete(scene, anim->m_Node, finished, anim->m_Userdata1, anim->m_Userdata2);
1899 }
1900 }
1901 }
1902
1903 void UpdateAnimations(HScene scene, float dt)
1904 {

Callers 2

UpdateAnimationsFunction · 0.85
DeleteNodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected