feat: add Activateable in Lightkeeper
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user