本文整理汇总了C#中OpenSim.Framework.RegionSettings.FromOSD方法的典型用法代码示例。如果您正苦于以下问题:C# RegionSettings.FromOSD方法的具体用法?C# RegionSettings.FromOSD怎么用?C# RegionSettings.FromOSD使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenSim.Framework.RegionSettings
的用法示例。
在下文中一共展示了RegionSettings.FromOSD方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UnpackRegionInfoData
public void UnpackRegionInfoData(OSDMap args)
{
if (args.ContainsKey("region_id"))
RegionID = args["region_id"].AsUUID();
if (args.ContainsKey("region_name"))
RegionName = args["region_name"].AsString();
if (args.ContainsKey("external_host_name"))
ExternalHostName = args["external_host_name"].AsString();
if (args.ContainsKey("http_port"))
UInt32.TryParse(args["http_port"].AsString(), out m_httpPort);
if (args.ContainsKey("region_xloc"))
{
int locx;
Int32.TryParse(args["region_xloc"].AsString(), out locx);
RegionLocX = locx;
}
if (args.ContainsKey("region_yloc"))
{
int locy;
Int32.TryParse(args["region_yloc"].AsString(), out locy);
RegionLocY = locy;
}
IPAddress ip_addr = null;
if (args.ContainsKey("internal_ep_address"))
{
IPAddress.TryParse(args["internal_ep_address"].AsString(), out ip_addr);
}
int port = 0;
if (args.ContainsKey("internal_ep_port"))
{
Int32.TryParse(args["internal_ep_port"].AsString(), out port);
}
InternalEndPoint = new IPEndPoint(ip_addr, port);
if (args.ContainsKey("allow_alt_ports"))
m_allow_alternate_ports = args["allow_alt_ports"].AsBoolean();
if (args.ContainsKey("region_type"))
m_regionType = args["region_type"].AsString();
if (args.ContainsKey("password"))
Password = args["password"].AsUUID();
if (args.ContainsKey("disabled"))
Disabled = args["disabled"].AsBoolean();
if (args.ContainsKey("scope_id"))
ScopeID = args["scope_id"].AsUUID();
if (args.ContainsKey("region_size_x"))
RegionSizeX = args["region_size_x"].AsInteger();
if (args.ContainsKey("region_size_y"))
RegionSizeY = args["region_size_y"].AsInteger();
if (args.ContainsKey("region_size_z"))
RegionSizeZ = args["region_size_z"].AsInteger();
if (args.ContainsKey("object_capacity"))
m_objectCapacity = args["object_capacity"].AsInteger();
if (args.ContainsKey("region_type"))
RegionType = args["region_type"].AsString();
if (args.ContainsKey("see_into_this_sim_from_neighbor"))
SeeIntoThisSimFromNeighbor = args["see_into_this_sim_from_neighbor"].AsBoolean();
if (args.ContainsKey("trust_binaries_from_foreign_sims"))
TrustBinariesFromForeignSims = args["trust_binaries_from_foreign_sims"].AsBoolean();
if (args.ContainsKey("allow_script_crossing"))
AllowScriptCrossing = args["allow_script_crossing"].AsBoolean();
if (args.ContainsKey("allow_physical_prims"))
AllowPhysicalPrims = args["allow_physical_prims"].AsBoolean();
if(args.ContainsKey("number_startup"))
NumberStartup = args["number_startup"].AsInteger();
if (args.ContainsKey ("startupType"))
Startup = (StartupType)args["startupType"].AsInteger();
FindExternalAutomatically = args["FindExternalIP"].AsBoolean();
if (args.ContainsKey("RegionSettings"))
{
RegionSettings = new RegionSettings();
RegionSettings.FromOSD((OSDMap)args["RegionSettings"]);
}
}