Beispiel #1
0
        /// <summary>
        /// Create a new SimSubScene and add it to scene.
        /// </summary>
        /// <param name="scene">The scene to add the sub scene to.</param>
        /// <returns>The newly created sub scene.</returns>
        public SimSubScene createSubScene(SimScene scene)
        {
            SimSubScene subscene = new SimSubScene(Name, scene);

            foreach (SimSubSceneBinding elementManager in bindings)
            {
                SimElementManager manager = scene.getSimElementManager(elementManager.SimElementManager.Name);
                if (manager != null)
                {
                    subscene.addSimElementManager(manager);
                }
                else
                {
                    Log.Default.sendMessage("Could not find SimElementManager called {0}. This has not been added to the scene.", LogLevel.Warning, "Engine", elementManager);
                }
            }
            scene.addSimSubScene(subscene);
            return(subscene);
        }