----------------------- SpawnComponent::c-tor load assets from ids
| 46 | // load assets from ids |
| 47 | // |
| 48 | SpawnComponent::SpawnComponent(core::HashString const meshId, |
| 49 | core::HashString const materialId, |
| 50 | float const s, |
| 51 | btCollisionShape* const shape, |
| 52 | float const shapeMass, |
| 53 | float const interv, |
| 54 | float const imp |
| 55 | ) |
| 56 | : collisionShape(shape) |
| 57 | , mass(shapeMass) |
| 58 | , scale(s) |
| 59 | , interval(interv) |
| 60 | , impulse(imp) |
| 61 | { |
| 62 | mesh = core::ResourceManager::Instance()->GetAssetData<render::MeshData>(meshId); |
| 63 | |
| 64 | // Load material |
| 65 | material = core::ResourceManager::Instance()->GetAssetData<render::Material>(materialId, false); |
| 66 | if (material == nullptr) |
| 67 | { |
| 68 | material = core::ResourceManager::Instance()->GetAssetData<render::MaterialInstance>(materialId); |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | |
| 73 | //============================ |
nothing calls this directly
no outgoing calls
no test coverage detected