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


C# Server.Point3D类代码示例

本文整理汇总了C#中Server.Point3D的典型用法代码示例。如果您正苦于以下问题:C# Point3D类的具体用法?C# Point3D怎么用?C# Point3D使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Point3D类属于Server命名空间,在下文中一共展示了Point3D类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			switch ( version )
			{
				case 1:
				case 0:
				{
					m_MultiID = reader.ReadInt();
					m_Offset = reader.ReadPoint3D();
					m_ShipName = reader.ReadString();

					if ( version == 0 )
						reader.ReadUInt();

					break;
				}
			}

			if ( LootType == LootType.Newbied )
				LootType = LootType.Blessed;

			if ( Weight == 0.0 )
				Weight = 1.0;
		}
开发者ID:jsrn,项目名称:MidnightWatchServer,代码行数:28,代码来源:BaseDockedBoat.cs

示例2: OnMovement

			public override void OnMovement( Mobile m, Point3D oldLocation )/////To Fix/////
		{
			
			if ( m.Alive && m is PlayerMobile )
			{
				PlayerMobile pm = (PlayerMobile)m;

				
				if ( InRange( pm, 2 ) && !InRange( oldLocation, 2 ) )
				{
					
					WormSilk ws = pm.Backpack.FindItemByType( typeof ( WormSilk ) ) as WormSilk;
		        

					if ( ws == null )
					{
						if ( ! pm.HasGump( typeof( RalphGump ) ) )
					{
					        pm.SendGump( new RalphGump( pm ) );
						
						return;
					}
					}
					else if ( ws != null )
					{
						Say( "I see you have found some worm silk! If you have 10, may I have them please?");
						
						return;
					}
				}
			}
		}
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:32,代码来源:Ralph.cs

示例3: OnTarget

			protected override void OnTarget( Mobile from, object targeted )
			{
				IPoint3D p = targeted as IPoint3D;

				if ( p == null )
					return;
				else if ( p is Item )
					p = ((Item)p).GetWorldTop();

				if ( m_First )
				{
					from.SendMessage( "Target another location to complete the bounding box." );
					from.Target = new PickTarget( new Point3D( p ), false, from.Map, m_Callback, m_State );
				}
				else if ( from.Map != m_Map )
				{
					from.SendMessage( "Both locations must reside on the same map." );
				}
				else if ( m_Map != null && m_Map != Map.Internal && m_Callback != null )
				{
					Point3D start = m_Store;
					Point3D end = new Point3D( p );

					Utility.FixPoints( ref start, ref end );

					m_Callback( from, m_Map, start, end, m_State );
				}
			}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:28,代码来源:BoundingBoxPicker.cs

示例4: OnLocationChange

		public override void OnLocationChange( Point3D oldLocation )
		{
			if ( m_Item != null )
				m_Item.Location = new Point3D( X, Y + 1, Z );
			if ( m_Item2 != null )
				m_Item2.Location = new Point3D( X, Y + 2, Z );
		}
开发者ID:jsrn,项目名称:MidnightWatchServer,代码行数:7,代码来源:LargeForge.cs

示例5: OnMovement

		public override void OnMovement( Mobile m, Point3D oldLocation )
		{
			if ( TurnedOn && IsLockedDown && (!m.Hidden || m.AccessLevel == AccessLevel.Player) && Utility.InRange( m.Location, this.Location, 2 ) && !Utility.InRange( oldLocation, this.Location, 2 ) )
				Effects.PlaySound( Location, Map, m_Sounds[ Utility.Random( m_Sounds.Length ) ] );
				
			base.OnMovement( m, oldLocation );
		}
开发者ID:PepeBiondi,项目名称:runsa,代码行数:7,代码来源:TragicRemainsOfTravesty.cs

示例6: CompassDirectionGump

		public CompassDirectionGump(Mobile from) : base(120, 50)
		{
			m_From = from;
            List<Point3D> pointList = Server.Regions.MazeOfDeathRegion.Path;
			
			Point3D cur = m_From.Location;
			Point3D northLoc = new Point3D(cur.X, cur.Y - 1, cur.Z);
			Point3D eastLoc = new Point3D(cur.X + 1, cur.Y, cur.Z);
			Point3D southLoc = new Point3D(cur.X, cur.Y + 1, cur.Z);
			Point3D westLoc = new Point3D(cur.X - 1, cur.Y, cur.Z);
			
			//this.Closable = false;
			
			//Empty radar
			AddImage(0, 0, 9007);
			
			//Arrows
			if(pointList.Contains(northLoc))
				AddImage(100, 50, 4501);
			
			if(pointList.Contains(eastLoc))
				AddImage(100, 100, 4503);

			if(pointList.Contains(southLoc))
				AddImage(50, 100, 4505);
				
			if(pointList.Contains(westLoc))
				AddImage(50, 50, 4507);
		}
开发者ID:Crome696,项目名称:ServUO,代码行数:29,代码来源:CompassDirectionGump.cs

示例7: SignEntry

			public SignEntry( string text, Point3D pt, int itemID, int mapLoc )
			{
				m_Text = text;
				m_Location = pt;
				m_ItemID = itemID;
				m_Map = mapLoc;
			}
开发者ID:greeduomacro,项目名称:unknown-shard-1,代码行数:7,代码来源:SignParser.cs

示例8: CheckMulti

		public static bool CheckMulti( Point3D p, Map map, bool houses, int housingrange )
		{
			if( map == null || map == Map.Internal )
				return false;

			Sector sector = map.GetSector( p.X, p.Y );

			for( int i = 0; i < sector.Multis.Count; ++i )
			{
				BaseMulti multi = sector.Multis[i];

				if( multi is BaseHouse )
				{
					BaseHouse bh = (BaseHouse)multi;

					if( ( houses && bh.IsInside( p, 16 ) ) || ( housingrange > 0 && bh.InRange( p, housingrange ) ) )
						return true;
				}
				else if( multi.Contains( p ))
				{
					return true;
				}
			}
			
			return false;
		}
开发者ID:nick12344356,项目名称:The-Basement,代码行数:26,代码来源:SpellHelper.cs

示例9: MovementPath

        public MovementPath(Mobile m, Point3D goal)
        {
            Point3D start = m.Location;
            Map map = m.Map;

            this.m_Map = map;
            this.m_Start = start;
            this.m_Goal = goal;

            if (map == null || map == Map.Internal)
                return;

            if (Utility.InRange(start, goal, 1))
                return;

            try
            {
                PathAlgorithm alg = m_OverrideAlgorithm;

                if (alg == null)
                {
                    alg = FastAStarAlgorithm.Instance;
                    //if ( !alg.CheckCondition( m, map, start, goal ) )	// SlowAstar is still broken
                    //	alg = SlowAStarAlgorithm.Instance;		// TODO: Fix SlowAstar
                }

                if (alg != null && alg.CheckCondition(m, map, start, goal))
                    this.m_Directions = alg.Find(m, map, start, goal);
            }
            catch (Exception e)
            {
                Console.WriteLine("Warning: {0}: Pathing error from {1} to {2}", e.GetType().Name, start, goal);
            }
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:34,代码来源:MovementPath.cs

示例10: RegisterToBoardGameControlItem

		public void RegisterToBoardGameControlItem( BoardGameControlItem boardgamecontrolitem, Point3D offset )
		{
			BoardGameControlItem = boardgamecontrolitem;
			Offset = offset;
			
			UpdatePosition();
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:7,代码来源:GamePiece.cs

示例11: OnLocationChange

		public override void OnLocationChange( Point3D oldLocation )
		{
			base.OnLocationChange( oldLocation );
			
			if ( m_Parrot != null )
				m_Parrot.Location = new Point3D( X, Y, Z + 12 );
		}		
开发者ID:PepeBiondi,项目名称:runsa,代码行数:7,代码来源:ParrotPerchAddon.cs

示例12: ShimmeringEffusionActivationTrammel

		public ShimmeringEffusionActivationTrammel()
			: base( 0xE27 )
		{
			Hue = 0;
			Mapa = Map.Trammel;
			EnterPoint = new Point3D( 6523, 139, -20 );
		}
开发者ID:xrunuo,项目名称:xrunuo,代码行数:7,代码来源:ShimmeringEffusionActivationTrammel.cs

示例13: DecoreItemInfo

 public DecoreItemInfo( string typestring, string name, int itemid, int hue, Point3D loc, Map map )
 {
     c_TypeString = typestring;
     c_ItemID = itemid;
     c_Location = loc;
     c_Map = map;
 }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:7,代码来源:DecoreItemInfo.cs

示例14: SlimyOintmentTrammel

		public SlimyOintmentTrammel()
			: base( 0x318E )
		{
			Mapa = Map.Trammel;
			Hue = 1109;
			EnterPoint = new Point3D( 6519, 382, 0 );
		}
开发者ID:xrunuo,项目名称:xrunuo,代码行数:7,代码来源:SlimyOintmentTrammel.cs

示例15: OnLocationChange

        public override void OnLocationChange(Point3D oldlocation)
        {
            base.OnLocationChange(oldlocation);

            if (Component != null)
                Component.Location = new Point3D(this.X - 1, this.Y, this.Z);
        }
开发者ID:Ravenwolfe,项目名称:ServUO,代码行数:7,代码来源:Beacon.cs


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