feat: add Activateable in Lightkeeper
This commit is contained in:
@@ -205,6 +205,20 @@ CameraComponent* Scene::GetCurrentCamera() const {
|
||||
return cameras.empty() ? nullptr : cameras.front();
|
||||
}
|
||||
|
||||
GameObject* Scene::FindGameObject(ObjectId id) const {
|
||||
if (id == InvalidObjectId) {
|
||||
return nullptr;
|
||||
}
|
||||
for (const auto* objects : {&m_objects, &m_pendingAdditions}) {
|
||||
for (const auto& object : *objects) {
|
||||
if (object != nullptr && !object->IsBeingDestroyed() && object->GetId() == id) {
|
||||
return object.get();
|
||||
}
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::vector<CameraComponent*> Scene::GetCameras() const {
|
||||
std::vector<CameraComponent*> cameras;
|
||||
for (const auto& object : m_objects) {
|
||||
|
||||
Reference in New Issue
Block a user