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


C# LandObject.ForceUpdateLandInfo方法代碼示例

本文整理匯總了C#中OpenSim.Region.CoreModules.World.Land.LandObject.ForceUpdateLandInfo方法的典型用法代碼示例。如果您正苦於以下問題:C# LandObject.ForceUpdateLandInfo方法的具體用法?C# LandObject.ForceUpdateLandInfo怎麽用?C# LandObject.ForceUpdateLandInfo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在OpenSim.Region.CoreModules.World.Land.LandObject的用法示例。


在下文中一共展示了LandObject.ForceUpdateLandInfo方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: PreprocessIncomingLandObjectFromStorage

 public bool PreprocessIncomingLandObjectFromStorage(LandData data)
 {
     ILandObject new_land = new LandObject(data.OwnerID, data.IsGroupOwned, m_scene);
     new_land.LandData = data;
     if (!new_land.SetLandBitmapFromByteArray())
         return false;
     new_land.ForceUpdateLandInfo ();
     new_land.SetInfoID ();
     AddLandObject(new_land, true);
     return true;
 }
開發者ID:kchi059,項目名稱:Aurora-Sim,代碼行數:11,代碼來源:ParcelManagementModule.cs

示例2: EventManagerOnIncomingLandDataFromStorage

        public void EventManagerOnIncomingLandDataFromStorage(List<LandData> data, Vector2 parcelOffset)
        {
            bool result = true;
            for (int i = 0; i < data.Count; i++)
            {
                if (!PreprocessIncomingLandObjectFromStorage(data[i], parcelOffset))
                    result = false;
            }
            List<ILandObject> newSimDefault = new List<ILandObject>();
            if (!result || data.Count == 0)//Force a new base first, then force a merge later
                if (AllParcels().Count > 0)
                    newSimDefault = AllParcels();
                else
                    newSimDefault = new List<ILandObject>(new ILandObject[1]{ResetSimLandObjects()});

            for (int i = 0; i < data.Count; i++)
            {
                ILandObject new_land = new LandObject(data[i].OwnerID, data[i].IsGroupOwned, m_scene);
                new_land.LandData = data[i];
                if (SetLandBitmapFromByteArray(new_land, !result, parcelOffset))//Merge it into the large parcel if possible
                {
                    new_land.ForceUpdateLandInfo();
                    new_land.SetInfoID();
                    AddLandObject(new_land, true);
                }
            }
            if (AllParcels().Count == 0)//Serious fallback
                ResetSimLandObjects();
        }
開發者ID:chazzmac,項目名稱:Aurora-Sim,代碼行數:29,代碼來源:ParcelManagementModule.cs

示例3: EventManagerOnIncomingLandDataFromStorage

        public void EventManagerOnIncomingLandDataFromStorage(List<LandData> data, Vector2 parcelOffset)
        {
            bool result = true;
#if (!ISWIN)
            foreach (LandData t in data)
            {
                if (!PreprocessIncomingLandObjectFromStorage(t, parcelOffset))
                {
                    result = false;
                }
            }
#else
            foreach (LandData t in data.Where(t => !PreprocessIncomingLandObjectFromStorage(t, parcelOffset)))
            {
                result = false;
            }
#endif
            List<ILandObject> newSimDefault = new List<ILandObject>();
            if (!result || data.Count == 0) //Force a new base first, then force a merge later
                newSimDefault = AllParcels().Count > 0 ? AllParcels() : new List<ILandObject>(new ILandObject[1] {ResetSimLandObjects()});

            foreach (LandData t in data)
            {
                ILandObject new_land = new LandObject(t.OwnerID, t.IsGroupOwned, m_scene);
                new_land.LandData = t;
                if (SetLandBitmapFromByteArray(new_land, !result, parcelOffset))
                    //Merge it into the large parcel if possible
                {
                    new_land.ForceUpdateLandInfo();
                    new_land.SetInfoID();
                    AddLandObject(new_land, true);
                }
            }
            if (AllParcels().Count == 0) //Serious fallback
                ResetSimLandObjects();
        }
開發者ID:savino1976,項目名稱:Aurora-Sim,代碼行數:36,代碼來源:ParcelManagementModule.cs


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