当前位置: 首页>>代码示例>>C#>>正文


C# IScene.Close方法代码示例

本文整理汇总了C#中IScene.Close方法的典型用法代码示例。如果您正苦于以下问题:C# IScene.Close方法的具体用法?C# IScene.Close怎么用?C# IScene.Close使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IScene的用法示例。


在下文中一共展示了IScene.Close方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: InnerCloseRegion

        private void InnerCloseRegion (IScene scene)
        {
            //Make sure that if we are set on the console, that we are removed from it
            if ((MainConsole.Instance.ConsoleScene != null) &&
                (MainConsole.Instance.ConsoleScene.RegionInfo.RegionID == scene.RegionInfo.RegionID))
                ChangeConsoleRegion ("root");

            m_localScenes.Remove (scene);
            scene.Close ();

            CloseModules (scene);
        }
开发者ID:NickyPerian,项目名称:Aurora-Sim,代码行数:12,代码来源:SceneManager.cs

示例2: quitSerialized

        private void quitSerialized(IScene scene, string[] args)
        {
            SerializeUsers(scene);
            scene.CloseQuietly = true;
            scene.Close(false);

            scene.RequestModuleInterface<ISimulationBase>().Shutdown(true);
        }
开发者ID:QueenStarfinder,项目名称:WhiteCore-Dev,代码行数:8,代码来源:InworldRestartSerializer.cs

示例3: CloseRegion

 /// <summary>
 ///     Shuts down a region and removes it from all running modules
 /// </summary>
 /// <param name="type"></param>
 /// <param name="seconds"></param>
 /// <returns></returns>
 public void CloseRegion(IScene scene, ShutdownType type, int seconds)
 {
     if (type == ShutdownType.Immediate)
     {
         scene.Close(true);
         if (OnCloseScene != null)
             OnCloseScene(scene);
         CloseModules(scene);
         m_scenes.Remove(scene);
     }
     else
     {
         Timer t = new Timer(seconds*1000); //Millisecond conversion
         t.Elapsed += (sender, e) => CloseRegion(scene, ShutdownType.Immediate, 0);
         t.AutoReset = false;
         t.Start();
     }
 }
开发者ID:emperorstarfinder,项目名称:Virtual-Universe,代码行数:24,代码来源:SceneManager.cs

示例4: CloseRegion

		/// <summary>
		///     Shuts down a region and removes it from all running modules
		/// </summary>
		/// <param name="scene"></param>
		/// <param name="type">Immediate or Delayed</param>
		/// <param name="delaySecs">Delay seconds</param>
		/// <param name="killAgents"> Kill any agents in the scene</param>
		/// <returns></returns>
		public void CloseRegion (IScene scene, ShutdownType type, int delaySecs, bool killAgents)
		{
			if (type == ShutdownType.Immediate) {
				scene.Close (killAgents);
				if (OnCloseScene != null)
					OnCloseScene (scene);
				CloseModules (scene);
				m_scenes.Remove (scene);
			} else {
				closeRegionTimer = new Timer (delaySecs * 1000); //Millisecond conversion
				closeRegionTimer.Elapsed += (sender, e) => TimedCloseRegion (scene, killAgents);
				closeRegionTimer.AutoReset = false;
				closeRegionTimer.Start ();
			}
		}
开发者ID:WhiteCoreSim,项目名称:WhiteCore-Dev,代码行数:23,代码来源:SceneManager.cs


注:本文中的IScene.Close方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。