當前位置: 首頁>>代碼示例>>C#>>正文


C# RegionSettings.FromOSD方法代碼示例

本文整理匯總了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"]);
            }
        }
開發者ID:RevolutionSmythe,項目名稱:Aurora-Sim,代碼行數:75,代碼來源:RegionInfo.cs


注:本文中的OpenSim.Framework.RegionSettings.FromOSD方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。