/// <summary> /// Create a definition. /// </summary> /// <returns>A new defintion.</returns> public SimSubSceneDefinition createDefinition(SimSceneDefinition scene) { SimSubSceneDefinition definition = new SimSubSceneDefinition(name); definition.setScene(scene); foreach (SimElementManager manager in simElements.Values) { definition.addBinding(scene.getSimElementManagerDefinition(manager.getName())); } return(definition); }
/// <summary> /// Create a definition. /// </summary> /// <returns>A new SimSceneDefinition.</returns> public SimSceneDefinition createDefinition() { SimSceneDefinition definition = new SimSceneDefinition(); foreach (SimElementManager manager in simElementManagers) { definition.addSimElementManagerDefinition(manager.createDefinition()); } foreach (SimSubScene subScene in simSubScenes.Values) { definition.addSimSubSceneDefinition(subScene.createDefinition(definition)); } if (defaultScene != null) { definition.DefaultSubScene = defaultScene.Name; } return(definition); }
/// <summary> /// Set the scene that this definition belongs to. This should only be /// called by SimSceneDefiniton. /// </summary> /// <param name="scene"></param> internal void setScene(SimSceneDefinition scene) { this.scene = scene; }