当前位置: 首页>>代码示例>>C#>>正文


C# LandObject.GetSquareLandBitmap方法代码示例

本文整理汇总了C#中OpenSim.Region.CoreModules.World.Land.LandObject.GetSquareLandBitmap方法的典型用法代码示例。如果您正苦于以下问题:C# LandObject.GetSquareLandBitmap方法的具体用法?C# LandObject.GetSquareLandBitmap怎么用?C# LandObject.GetSquareLandBitmap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OpenSim.Region.CoreModules.World.Land.LandObject的用法示例。


在下文中一共展示了LandObject.GetSquareLandBitmap方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateDefaultParcel

 /// <summary>
 /// Create a default parcel that spans the entire region and is owned by the estate owner.
 /// </summary>
 /// <returns>The parcel created.</returns>
 protected ILandObject CreateDefaultParcel()
 {
     m_log.DebugFormat(
         "[LAND MANAGEMENT MODULE]: Creating default parcel for region {0}", m_scene.RegionInfo.RegionName);
     
     ILandObject fullSimParcel = new LandObject(UUID.Zero, false, m_scene);                                                
     fullSimParcel.SetLandBitmap(fullSimParcel.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize));
     fullSimParcel.LandData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
     fullSimParcel.LandData.ClaimDate = Util.UnixTimeSinceEpoch();
     
     return AddLandObject(fullSimParcel);            
 }
开发者ID:AkiraSonoda,项目名称:akisim,代码行数:16,代码来源:LandManagementModule.cs

示例2: CreateDefaultParcel

        /// <summary>
        /// Create a default parcel that spans the entire region and is owned by the estate owner.
        /// </summary>
        /// <returns>The parcel created.</returns>
        protected ILandObject CreateDefaultParcel()
        {
            m_log.DebugFormat("{0} Creating default parcel for region {1}", LogHeader, m_scene.RegionInfo.RegionName);

            ILandObject fullSimParcel = new LandObject(UUID.Zero, false, m_scene);

            fullSimParcel.SetLandBitmap(fullSimParcel.GetSquareLandBitmap(0, 0,
                                            (int)m_scene.RegionInfo.RegionSizeX, (int)m_scene.RegionInfo.RegionSizeY));
            fullSimParcel.LandData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
            fullSimParcel.LandData.ClaimDate = Util.UnixTimeSinceEpoch();

            return AddLandObject(fullSimParcel);
        }
开发者ID:nebadon2025,项目名称:opensimulator,代码行数:17,代码来源:LandManagementModule.cs

示例3: ResetSimLandObjects

        /// <summary>
        /// Resets the sim to the default land object (full sim piece of land owned by the default user)
        /// </summary>
        public void ResetSimLandObjects()
        {
            //Remove all the land objects in the sim and add a blank, full sim land object set to public
            lock (m_landList)
            {
                m_landList.Clear();
                m_lastLandLocalID = ParcelManagementModule.START_LAND_LOCAL_ID;
                m_landIDList.Initialize();
            }

            ILandObject fullSimParcel = new LandObject(UUID.Zero, false, m_scene);

            fullSimParcel.SetLandBitmap(fullSimParcel.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize));
            fullSimParcel.LandData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
            fullSimParcel.LandData.ClaimDate = Util.UnixTimeSinceEpoch();
            fullSimParcel.SetInfoID();
            AddLandObject(fullSimParcel);
        }
开发者ID:KristenMynx,项目名称:Aurora-Sim,代码行数:21,代码来源:ParcelManagementModule.cs

示例4: ResetSimLandObjects

        /// <summary>
        /// Resets the sim to the default land object (full sim piece of land owned by the default user)
        /// </summary>
        public void ResetSimLandObjects()
        {
            //Remove all the land objects in the sim and add a blank, full sim land object set to public
            lock (m_landList)
            {
                m_landList.Clear();
                m_lastLandLocalID = ParcelManagementModule.START_LAND_LOCAL_ID;
                m_landIDList.Initialize();
            }

            ILandObject fullSimParcel = new LandObject(UUID.Zero, false, m_scene);

            fullSimParcel.SetLandBitmap(fullSimParcel.GetSquareLandBitmap(0, 0, m_scene.RegionInfo.RegionSizeX, m_scene.RegionInfo.RegionSizeY));
            
            if (fullSimParcel.LandData.OwnerID == UUID.Zero)
                fullSimParcel.LandData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;

            UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, fullSimParcel.LandData.OwnerID);

            while (fullSimParcel.LandData.OwnerID == UUID.Zero || account == null)
            {
                m_log.Warn("[ParcelManagement]: Could not find user for parcel, please give a valid user to make the owner");
                string userName = MainConsole.Instance.CmdPrompt("User Name:", "");
                if (userName == "")
                {
                    m_log.Warn("Put in a valid username.");
                    continue;
                }
                account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, userName);
                if (account != null)
                    fullSimParcel.LandData.OwnerID = account.PrincipalID;
                else
                    m_log.Warn("Could not find the user.");
            }
            m_log.Info("[ParcelManagement]: No land found for region " + m_scene.RegionInfo.RegionName +
                ", setting owner to " + fullSimParcel.LandData.OwnerID);
            fullSimParcel.LandData.ClaimDate = Util.UnixTimeSinceEpoch();
            fullSimParcel.SetInfoID();
            AddLandObject(fullSimParcel);
        }
开发者ID:x8ball,项目名称:Aurora-Sim,代码行数:43,代码来源:ParcelManagementModule.cs


注:本文中的OpenSim.Region.CoreModules.World.Land.LandObject.GetSquareLandBitmap方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。