コード例 #1
0
        /// <summary>
        /// Returns a new SimObjectManager that contains all the SimObjects
        /// defined in this class. The SimObjects will be empty, but they will
        /// be registered for construction.
        /// </summary>
        /// <param name="subScene">The SimSubScene that will be used to build the objects in the returned manager.</param>
        /// <returns>A new SimObjectManager that contains empty SimObjects ready to be built into the given SimSubScene.</returns>
        public SimObjectManager createSimObjectManager(SimSubScene subScene)
        {
            SimObjectManager manager = new SimObjectManager(subScene);

            foreach (SimObjectDefinition instance in simObjects.Values)
            {
                SimObjectBase simObject = instance.register(subScene);
                manager.addSimObject(simObject);
            }
            return(manager);
        }
コード例 #2
0
ファイル: SimObject.cs プロジェクト: AnomalousMedical/Engine
 /// <summary>
 /// This function will unset the SimObjectManager used to lookup other SimObjects.
 /// It should only be called by the SimObjectManager.
 /// </summary>
 internal void _unsetSimObjectManager()
 {
     simObjectManager = null;
 }
コード例 #3
0
ファイル: SimObject.cs プロジェクト: AnomalousMedical/Engine
 /// <summary>
 /// This function will set the SimObjectManager used to lookup other SimObjects.
 /// It should only be called by the SimObjectManager.
 /// </summary>
 /// <param name="manager">The SimObjectManager this SimObject now belongs to.</param>
 internal void _setSimObjectManager(SimObjectManager manager)
 {
     simObjectManager = manager;
 }