| 530 | } |
| 531 | |
| 532 | void Scene::removeGameObject(const std::string& id) |
| 533 | { |
| 534 | m_gameObjectArray.erase( |
| 535 | std::remove_if(m_gameObjectArray.begin(), m_gameObjectArray.end(), |
| 536 | [&id](const std::unique_ptr<Script::GameObject>& ptr) { |
| 537 | return (ptr->getId() == id); |
| 538 | }), |
| 539 | m_gameObjectArray.end()); |
| 540 | } |
| 541 | |
| 542 | std::vector<Script::GameObject*> Scene::getAllGameObjects( |
| 543 | const std::string& objectType) |