feat: add Activateable in Lightkeeper

This commit is contained in:
2026-10-17 17:00:00 +02:00
parent 89a168f76d
commit 70c940c476
13 changed files with 354 additions and 5 deletions
+20
View File
@@ -107,6 +107,25 @@ namespace {
"destroying a parent must mark descendants");
}
void testSceneFindGameObject()
{
Scene& scene = SceneManager::GetInstance().CreateScene("find-object");
GameObject* pending = scene.CreateGameObject("pending");
check(scene.FindGameObject(pending->GetId()) == pending, "objects must be found while still pending");
scene.CommitPendingAdditions();
GameObject* committed = scene.CreateGameObject("committed");
scene.CommitPendingAdditions();
check(scene.FindGameObject(committed->GetId()) == committed, "committed objects must be found by id");
check(scene.FindGameObject(InvalidObjectId) == nullptr, "the invalid id must never match");
const ObjectId destroyedId = committed->GetId();
committed->Destroy();
check(scene.FindGameObject(destroyedId) == nullptr, "objects being destroyed must not be found");
SceneManager::GetInstance().Destroy();
}
void testSceneRoundTrip()
{
Scene& scene = SceneManager::GetInstance().CreateScene("round-trip");
@@ -1198,6 +1217,7 @@ namespace {
int main()
{
testTransforms();
testSceneFindGameObject();
testSceneRoundTrip();
testEventMutation();
testEventRemoval();