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

Function StopAnimations

engine/gameobject/src/gameobject/comp_anim.cpp:127–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125 }
126
127 static void StopAnimations(AnimWorld* world, uint16_t* head_ptr, dmhash_t component_id, dmhash_t property_id)
128 {
129 if (head_ptr != 0x0)
130 {
131 uint16_t index = *head_ptr;
132 while (index != INVALID_INDEX)
133 {
134 Animation* anim = &world->m_Animations[world->m_AnimMap[index]];
135 if (anim->m_ComponentId == component_id && (property_id == 0 || anim->m_PropertyId == property_id))
136 {
137 StopAnimation(anim, false);
138 }
139 index = anim->m_Next;
140 }
141 }
142 }
143
144 static void StopAllAnimations(AnimWorld* world, uint16_t* head_ptr)
145 {

Callers 1

CancelAnimationsFunction · 0.85

Calls 1

StopAnimationFunction · 0.85

Tested by

no test coverage detected