コード例 #1
0
 /// <summary>
 /// Add a SimSubSceneDefinition.
 /// </summary>
 /// <param name="def">The definition to add.</param>
 public void addSimSubSceneDefinition(SimSubSceneDefinition def)
 {
     subSceneDefinitions.Add(def.Name, def);
     def.setScene(this);
     if (editInterface != null)
     {
         createEditInterface(def);
     }
 }
コード例 #2
0
 /// <summary>
 /// Remove a SimSubSceneDefinition.
 /// </summary>
 /// <param name="def">The definition to remove.</param>
 public void removeSimSubSceneDefinition(SimSubSceneDefinition def)
 {
     subSceneDefinitions.Remove(def.Name);
     def.setScene(null);
     if (editInterface != null)
     {
         subScenes.removeSubInterface(def);
     }
 }
コード例 #3
0
        /// <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);
        }