Ejemplo n.º 1
0
 private void CoreLoadScene(SceneAsset asset)
 {
     BeforeSceneLoaded?.Invoke();
     ClearCurrentSceneGameObjects();
     _game.FlushDeletedObjects();
     asset.GenerateGameObjects();
     _loadedScene = asset;
     AfterSceneLoaded?.Invoke();
     _game.NewSceneLoaded();
 }
Ejemplo n.º 2
0
 public void LoadSceneAsset(SceneAsset sa)
 {
     // generate game objects (and populate the _cullRenderables list) #MultiThread/Tasks
     // TODO: make this work in parallel. Sometimes the _cullRenderable list isn't complete before this line continues.
     sa.GenerateGameObjects(this, false);
     // enumerate the newly populated _cullRenderables list and add to the _octree
     foreach (var cr in _cullRenderables)
     {
         _octree.AddItem(cr.BoundingBox(), cr);
     }
 }