本文整理汇总了C#中OpenSim.Region.Framework.Scenes.Scene.DeleteAllSceneObjects方法的典型用法代码示例。如果您正苦于以下问题:C# Scene.DeleteAllSceneObjects方法的具体用法?C# Scene.DeleteAllSceneObjects怎么用?C# Scene.DeleteAllSceneObjects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenSim.Region.Framework.Scenes.Scene
的用法示例。
在下文中一共展示了Scene.DeleteAllSceneObjects方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ClearXmlRpcHandler
public XmlRpcResponse ClearXmlRpcHandler(XmlRpcRequest request, IPEndPoint client)
{
// AuthClient.VerifySession(GetUserServerURL(userID), userID, sessionID);
XmlRpcResponse response = new XmlRpcResponse();
Hashtable requestData = (Hashtable)request.Params[0];
Hashtable resp = new Hashtable();
if (requestData.ContainsKey("RegionID"))
{
UUID regionID = UUID.Parse((string)requestData["RegionID"]);
m_scene = SelectRegion(regionID);
m_scene.DeleteAllSceneObjects();
}
else
{
resp["success"] = false;
resp["error"] = "no RegionID provided";
response.Value = resp;
return response;
}
// return ok;
resp["success"] = true;
response.Value = resp;
return response;
}
示例2: RemoveRegion
public void RemoveRegion(Scene scene, bool cleanup)
{
// only need to check this if we are not at the
// root level
if ((SceneManager.CurrentScene != null) &&
(SceneManager.CurrentScene.RegionInfo.RegionID == scene.RegionInfo.RegionID))
{
SceneManager.TrySetCurrentScene("..");
}
if (cleanup)
{
scene.DeleteAllSceneObjects();
}
SceneManager.CloseScene(scene);
ShutdownClientServer(scene.RegionInfo);
if (!cleanup)
return;
if (!String.IsNullOrEmpty(scene.RegionInfo.RegionFile))
{
if (scene.RegionInfo.RegionFile.ToLower().EndsWith(".xml"))
{
File.Delete(scene.RegionInfo.RegionFile);
m_log.InfoFormat("[OPENSIM]: deleting region file \"{0}\"", scene.RegionInfo.RegionFile);
}
if (scene.RegionInfo.RegionFile.ToLower().EndsWith(".ini"))
{
try
{
IniConfigSource source = new IniConfigSource(scene.RegionInfo.RegionFile);
if (source.Configs[scene.RegionInfo.RegionName] != null)
{
source.Configs.Remove(scene.RegionInfo.RegionName);
if (source.Configs.Count == 0)
{
File.Delete(scene.RegionInfo.RegionFile);
}
else
{
source.Save(scene.RegionInfo.RegionFile);
}
}
}
catch (Exception)
{
}
}
}
}
示例3: RemoveRegion
public void RemoveRegion(Scene scene, bool cleanup)
{
// only need to check this if we are not at the
// root level
if ((m_sceneManager.CurrentScene != null) &&
(m_sceneManager.CurrentScene.RegionInfo.RegionID == scene.RegionInfo.RegionID))
{
m_sceneManager.TrySetCurrentScene("..");
}
scene.DeleteAllSceneObjects();
m_sceneManager.CloseScene(scene);
if (!cleanup)
return;
if (!String.IsNullOrEmpty(scene.RegionInfo.RegionFile))
{
File.Delete(scene.RegionInfo.RegionFile);
m_log.InfoFormat("[HALCYON]: deleting region file \"{0}\"", scene.RegionInfo.RegionFile);
}
}