本文整理汇总了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;
}
示例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;
}
}
}
}
示例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 );
}
}
示例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 );
}
示例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 );
}
示例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);
}
示例7: SignEntry
public SignEntry( string text, Point3D pt, int itemID, int mapLoc )
{
m_Text = text;
m_Location = pt;
m_ItemID = itemID;
m_Map = mapLoc;
}
示例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;
}
示例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);
}
}
示例10: RegisterToBoardGameControlItem
public void RegisterToBoardGameControlItem( BoardGameControlItem boardgamecontrolitem, Point3D offset )
{
BoardGameControlItem = boardgamecontrolitem;
Offset = offset;
UpdatePosition();
}
示例11: OnLocationChange
public override void OnLocationChange( Point3D oldLocation )
{
base.OnLocationChange( oldLocation );
if ( m_Parrot != null )
m_Parrot.Location = new Point3D( X, Y, Z + 12 );
}
示例12: ShimmeringEffusionActivationTrammel
public ShimmeringEffusionActivationTrammel()
: base( 0xE27 )
{
Hue = 0;
Mapa = Map.Trammel;
EnterPoint = new Point3D( 6523, 139, -20 );
}
示例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;
}
示例14: SlimyOintmentTrammel
public SlimyOintmentTrammel()
: base( 0x318E )
{
Mapa = Map.Trammel;
Hue = 1109;
EnterPoint = new Point3D( 6519, 382, 0 );
}
示例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);
}