Esempio n. 1
0
        /// <summary>
        /// Create a new SimObjectManagerDefinition that can recreate this
        /// SimObjectManager exactly how it is when this function is called.
        /// </summary>
        /// <returns>A new SimObjectManagerDefinition configured appropriatly.</returns>
        public SimObjectManagerDefinition saveToDefinition()
        {
            SimObjectManagerDefinition definition = new SimObjectManagerDefinition();

            foreach (SimObjectBase simObject in simObjects.Values)
            {
                SimObjectDefinition simObjDef = simObject.saveToDefinition(simObject.Name);
                definition.addSimObject(simObjDef);
            }
            return(definition);
        }
Esempio n. 2
0
 /// <summary>
 /// Load Constructor.
 /// </summary>
 /// <param name="info">The load info.</param>
 private ScenePackage(LoadInfo info)
 {
     SceneDefinition            = info.GetValue <SimSceneDefinition>(SCENE);
     ResourceManager            = info.GetValue <ResourceManager>(RESOURCES);
     SimObjectManagerDefinition = info.GetValue <SimObjectManagerDefinition>(SIM_OBJECTS);
 }