| 83 | // } |
| 84 | |
| 85 | std::shared_ptr<game::ModelType> GameScene::FindModelType(const std::string& modelTypeName) |
| 86 | { |
| 87 | if (modelTypeName == "") |
| 88 | return nullptr; |
| 89 | auto it = std::find_if(m_modelTypes.begin(), m_modelTypes.end(), [ &modelTypeName ](const std::shared_ptr<game::ModelType>& pt) { return pt->GetModelName() == modelTypeName; }); |
| 90 | if (it == m_modelTypes.end()) |
| 91 | return nullptr; |
| 92 | return *it; |
| 93 | } |
| 94 | |
| 95 | std::shared_ptr<game::PropBase> GameScene::CreatePropFromFile(const std::string& name, const std::filesystem::path& storagePath, const Json::Value& jsonRoot) |
| 96 | { |