MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / getAllGameObjects

Method getAllGameObjects

src/Core/Scene/Scene.cpp:542–552  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

540 }
541
542 std::vector<Script::GameObject*> Scene::getAllGameObjects(
543 const std::string& objectType)
544 {
545 std::vector<Script::GameObject*> returnVec;
546 for (auto& gameObject : m_gameObjectArray)
547 {
548 if (objectType.empty() || objectType == gameObject->getType())
549 returnVec.push_back(gameObject.get());
550 }
551 return returnVec;
552 }
553
554 Script::GameObject& Scene::createGameObject(
555 const std::string& obj, const std::string& id)

Callers 1

LoadClassSceneFunction · 0.80

Calls 4

emptyMethod · 0.45
getTypeMethod · 0.45
push_backMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected