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

Function LuaAnimationStopped

engine/gameobject/src/gameobject/gameobject_script.cpp:1527–1542  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1525 }
1526
1527 static void LuaAnimationStopped(dmGameObject::HInstance instance, dmhash_t component_id, dmhash_t property_id,
1528 bool finished, void* userdata1, void* userdata2)
1529 {
1530 dmScript::LuaCallbackInfo* cbk = (dmScript::LuaCallbackInfo*)userdata1;
1531 if (dmScript::IsCallbackValid(cbk) && finished)
1532 {
1533 dmMessage::URL url;
1534 url.m_Socket = dmGameObject::GetMessageSocket(instance->m_Collection->m_HCollection);
1535 url.m_Path = instance->m_Identifier;
1536 url.m_Fragment = component_id;
1537
1538 LuaAnimationStoppedArgs args(url, property_id);
1539 dmScript::InvokeCallback(cbk, LuaAnimationStoppedCallback, &args);
1540 }
1541 dmScript::DestroyCallback(cbk);
1542 }
1543
1544 /*# animates a named property of the specified game object or component
1545 *

Callers

nothing calls this directly

Calls 4

IsCallbackValidFunction · 0.85
GetMessageSocketFunction · 0.85
DestroyCallbackFunction · 0.85
InvokeCallbackFunction · 0.50

Tested by

no test coverage detected