| 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, |