本文整理汇总了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);
}
示例2: quitSerialized
private void quitSerialized(IScene scene, string[] args)
{
SerializeUsers(scene);
scene.CloseQuietly = true;
scene.Close(false);
scene.RequestModuleInterface<ISimulationBase>().Shutdown(true);
}
示例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();
}
}
示例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 ();
}
}