當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。