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

Function GetWorld

engine/gameobject/src/gameobject/comp_anim.cpp:396–405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

394 }
395
396 static AnimWorld* GetWorld(HCollection hcollection)
397 {
398 HResourceType resource_type;
399 dmResource::Result result = dmResource::GetTypeFromExtension(dmGameObject::GetFactory(hcollection), "animc", &resource_type);
400 assert(result == dmResource::RESULT_OK);
401 uint32_t component_index;
402 ComponentType* type = FindComponentType(dmGameObject::GetRegister(hcollection), resource_type, &component_index);
403 assert(type != 0x0);
404 return (AnimWorld*)dmGameObject::GetWorld(hcollection, component_index);
405 }
406
407 static bool PlayAnimation(AnimWorld* world, HInstance instance, dmhash_t component_id,
408 dmhash_t property_id,

Callers 15

AnimateFunction · 0.70
CancelAnimationsFunction · 0.70
CancelAnimationCallbacksFunction · 0.70
DispatchCallbackFunction · 0.50
DispatchCallbackFunction · 0.50
GetGuiComponentFunction · 0.50
TEST_FFunction · 0.50
TEST_PFunction · 0.50
Physics_RayCastAsyncFunction · 0.50
Physics_RayCastFunction · 0.50
Physics_SetGravityFunction · 0.50
Physics_GetGravityFunction · 0.50

Calls 5

GetTypeFromExtensionFunction · 0.85
FindComponentTypeFunction · 0.85
GetRegisterFunction · 0.85
GetFactoryFunction · 0.70
assertFunction · 0.50

Tested by 3

GetGuiComponentFunction · 0.40
TEST_FFunction · 0.40
TEST_PFunction · 0.40