本文整理汇总了C#中IPoint3D类的典型用法代码示例。如果您正苦于以下问题:C# IPoint3D类的具体用法?C# IPoint3D怎么用?C# IPoint3D使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IPoint3D类属于命名空间,在下文中一共展示了IPoint3D类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Target
public void Target( IPoint3D p )
{
if ( !Caster.CanSee( p ) )
{
Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
}
else if ( SpellHelper.CheckTown( p, Caster ) && CheckSequence() )
{
SpellHelper.Turn( Caster, p );
SpellHelper.GetSurfaceTop( ref p );
int dx = Caster.Location.X - p.X;
int dy = Caster.Location.Y - p.Y;
int rx = (dx - dy) * 44;
int ry = (dx + dy) * 44;
bool eastToWest;
if ( rx >= 0 && ry >= 0 )
eastToWest = false;
else if ( rx >= 0 )
eastToWest = true;
else if ( ry >= 0 )
eastToWest = true;
else
eastToWest = false;
Effects.PlaySound( p, Caster.Map, 0x20B );
int itemID = eastToWest ? 0x3967 : 0x3979;
TimeSpan duration = TimeSpan.FromSeconds( 3.0 + (Caster.Skills[SkillName.Magery].Value / 3.0) );
for ( int i = -2; i <= 2; ++i )
{
Point3D loc = new Point3D( eastToWest ? p.X + i : p.X, eastToWest ? p.Y : p.Y + i, p.Z );
bool canFit = SpellHelper.AdjustField( ref loc, Caster.Map, 12, false );
if ( !canFit )
continue;
Item item = new InternalItem( Caster, itemID, loc, Caster.Map, duration );
int hours, minutes;
Server.Items.Clock.GetTime( Caster.Map, loc.X, loc.Y, out hours, out minutes );
if(hours >= 6 && hours < 22 && item.Light != LightType.Empty && !SpellHelper.IsFeluccaDungeon(item.Map, item.Location)) //its daytime disable light
item.Light = LightType.Empty;
else
item.Light = LightType.Circle300;
item.ProcessDelta();
Effects.SendLocationParticles( EffectItem.Create( loc, Caster.Map, EffectItem.DefaultDuration ), 0x376A, 9, 10, 5048 );
}
}
FinishSequence();
}
开发者ID:zerodowned,项目名称:angelisland,代码行数:60,代码来源:ParalyzeField.cs
示例2: Target
public void Target(IPoint3D p)
{
Map map = Caster.Map;
SpellHelper.GetSurfaceTop(ref p);
if (map == null || !map.CanSpawnMobile(p.X, p.Y, p.Z))
{
Caster.SendLocalizedMessage(501942); // That location is blocked.
}
else if (SpellHelper.CheckTown(p, Caster) && CheckSequence())
{
TimeSpan duration;
if (Caster.EraAOS)
{
duration = TimeSpan.FromSeconds(60.0);
}
else if (Caster.EraUOR)
{
duration = TimeSpan.FromSeconds(Utility.Random(60, 20));
}
else
{
// HACK: Convert to T2A mechanics.
duration = TimeSpan.FromSeconds(Utility.Random(60, 20));
}
BaseCreature.Summon(new EnergyVortex(), false, Caster, new Point3D(p), 0x212, duration);
}
FinishSequence();
}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:33,代码来源:EnergyVortex.cs
示例3: DoFireEffect
public void DoFireEffect(IPoint3D target)
{
Point3D from;
switch (CannonDirection)
{
case CannonDirection.North:
from = new Point3D(X, Y - 1, Z);
break;
case CannonDirection.East:
from = new Point3D(X + 1, Y, Z);
break;
case CannonDirection.South:
from = new Point3D(X, Y + 1, Z);
break;
default:
from = new Point3D(X - 1, Y, Z);
break;
}
Effects.SendLocationEffect(from, Map, 0x36B0, 16, 1);
Effects.PlaySound(from, Map, 0x11D);
Effects.SendLocationEffect(target, Map, 0x36B0, 16, 1);
Effects.PlaySound(target, Map, 0x11D);
}
开发者ID:rokann,项目名称:JustUO,代码行数:25,代码来源:Cannon.cs
示例4: Target
public void Target(IPoint3D p)
{
if (!Caster.CanSee(p))
{
Caster.SendLocalizedMessage(500237); // Target can not be seen.
}
else if (SphereSpellTarget is BaseWand)
{
BaseWand bw = SphereSpellTarget as BaseWand;
bw.RechargeWand(Caster, this);
}
else if (CheckSequence())
{
SpellHelper.GetSurfaceTop(ref p);
Map map = Caster.Map;
if (map != null)
{
IPooledEnumerable eable = map.GetMobilesInRange(new Point3D(p), Core.AOS ? 2 : 3);
foreach (Mobile m in eable)
ProtectionSpell.ApplyProtectionEffect(m, Caster);
eable.Free();
}
}
FinishSequence();
}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:30,代码来源:ArchProtection.cs
示例5: SetSource
public virtual void SetSource(IPoint3D source)
{
if (IsDisposed || Source == source)
{
return;
}
if (source == null)
{
Source = null;
return;
}
if (source is IEntity)
{
Source = (IEntity)source;
Map = Source.Map;
return;
}
if (Source is Mobile)
{
((Mobile)Source).Location = source.Clone3D();
return;
}
if (Source is Item)
{
((Item)Source).Location = source.Clone3D();
return;
}
Source = new Entity(Serial.Zero, source.Clone3D(), Source != null ? Source.Map : Map);
}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:34,代码来源:EffectInfo.cs
示例6: Create
public static EffectItem Create( IPoint3D p, IMap map, TimeSpan duration )
{
EffectItem item = null;
for ( int i = m_Free.Count - 1; item == null && i >= 0; --i ) // We reuse new entries first so decay works better
{
EffectItem free = (EffectItem) m_Free[i];
m_Free.RemoveAt( i );
if ( !free.Deleted && free.Map == Map.Internal )
item = free;
}
if ( item == null )
{
item = new EffectItem();
}
else
{
item.ItemID = 1;
}
item.MoveToWorld( new Point3D( p ), map as Map );
item.BeginFree( duration );
return item;
}
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:28,代码来源:EffectItem.cs
示例7: Target
public void Target(IPoint3D p)
{
if (!Caster.CanSee(p))
{
Caster.SendAsciiMessage("Target is not in line of sight.");
DoFizzle();
}
else if (SphereSpellTarget is BaseWand)
{
BaseWand bw = SphereSpellTarget as BaseWand;
bw.RechargeWand(Caster, this);
}
else if (CheckSequence())
{
FoodInfo foodInfo = m_Food[Utility.Random(m_Food.Length)];
Item food = foodInfo.Create();
Point3D loc = new Point3D(p);
if (food != null)
{
food.MoveToWorld(loc, Caster.Map);
// You magically create food in your backpack:
Caster.SendAsciiMessage("You create " + foodInfo.Name);
Caster.FixedParticles(0, 10, 5, 2003, EffectLayer.RightHand);
Caster.PlaySound(Sound);
}
}
FinishSequence();
}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:32,代码来源:CreateFood.cs
示例8: Target
public void Target( IPoint3D p )
{
if ( !Caster.CanSee( p ) )
{
Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
}
else if ( SpellHelper.CheckTown( p, Caster ) && CheckSequence() )
{
SpellHelper.Turn( Caster, p );
SpellHelper.GetSurfaceTop( ref p );
Effects.PlaySound( p, Caster.Map, 0x243 );
int stonex;
int stoney;
int stonez;
Point3D loc = new Point3D( p.X, p.Y, p.Z );
Item item = new InternalItema( loc, Caster.Map, Caster );
stonex=p.X;
stoney=p.Y-1;
stonez=p.Z;
Point3D loca = new Point3D( stonex, stoney, stonez );
Item itema = new InternalItemb( loca, Caster.Map, Caster );
}
FinishSequence();
}
开发者ID:evildude807,项目名称:kaltar,代码行数:29,代码来源:LureStoneSpell.cs
示例9: Target
public void Target(IPoint3D p)
{
Map map = Caster.Map;
SpellHelper.GetSurfaceTop(ref p);
if (SphereSpellTarget is BaseWand)
{
BaseWand bw = SphereSpellTarget as BaseWand;
bw.RechargeWand(Caster, this);
}
else if ((map == null || !map.CanSpawnMobile(p.X, p.Y, p.Z)) && !(SphereSpellTarget is Mobile))
{
Caster.SendLocalizedMessage(501942); // That location is blocked.
}
else if (/*SpellHelper.CheckTown(p, Caster) && */CheckSequence())
{
TimeSpan duration;
if (Core.AOS)
duration = TimeSpan.FromSeconds(90.0);
else
duration = TimeSpan.FromSeconds(Utility.Random(300, 240));
if (Caster.InLOS(p))
//BaseCreature.Summon(new Daemon(), false, Caster, new Point3D(p), 0x212, duration);
SpellHelper.Summon(new EarthElemental(), Caster, Sound, duration, false, false, new Point3D(p));
else
Caster.SendAsciiMessage("You can't see that.");
}
FinishSequence();
}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:33,代码来源:EarthElemental.cs
示例10: Target
public void Target( IPoint3D p )
{
if ( ( Caster.Followers + 5 ) > Caster.FollowersMax )
{
Caster.SendLocalizedMessage( 1049645 ); // You have too many followers to summon that creature.
return;
}
Map map = Caster.Map;
SpellHelper.GetSurfaceTop( ref p );
if ( map == null || ( Caster.IsPlayer && !map.CanSpawnMobile( p.X, p.Y, p.Z ) ) )
{
Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
}
else if ( SpellHelper.CheckTown( p, Caster ) && CheckSequence() )
{
int level = (int) ( GetBaseSkill( Caster ) + GetBoostSkill( Caster ) );
TimeSpan duration = TimeSpan.FromSeconds( level / 4 );
BaseCreature summon = new RisingColossus( level );
BaseCreature.Summon( summon, false, Caster, new Point3D( p ), 0x656, duration );
Effects.SendTargetParticles( summon, 0x3728, 10, 10, 0x13AA, (EffectLayer) 255 );
}
FinishSequence();
}
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:30,代码来源:RisingColossusSpell.cs
示例11: Target
public void Target( IPoint3D p )
{
if ( !Caster.CanSee( p ) )
{
Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
}
else if ( CheckSequence() )
{
SpellHelper.Turn( Caster, p );
SpellHelper.GetSurfaceTop( ref p );
Effects.PlaySound( p, Caster.Map, 0x382 );
Point3D loc = new Point3D( p.X, p.Y, p.Z );
Item item = new InternalItem( loc, Caster.Map, Caster );
}
FinishSequence();
}
开发者ID:greeduomacro,项目名称:unknown-shard-1,代码行数:28,代码来源:RestorativeSoilSpell.cs
示例12: EffectInfo
public EffectInfo(
IPoint3D source,
Map map,
int effectID,
int hue = 0,
int speed = 10,
int duration = 10,
EffectRender render = EffectRender.Normal,
TimeSpan? delay = null,
Action callback = null)
{
Map = map;
EffectID = effectID;
Hue = hue;
Speed = speed;
Duration = duration;
Render = render;
Delay = delay ?? TimeSpan.Zero;
if (callback != null)
{
Callback += callback;
}
SetSource(source);
}
开发者ID:greeduomacro,项目名称:RuneUO,代码行数:26,代码来源:EffectInfo.cs
示例13: Target
public void Target( IPoint3D point )
{
Point3D p = new Point3D( point );
Map map = Caster.Map;
if ( map == null )
return;
HouseRegion r = Region.Find( p, map ).GetRegion( typeof( HouseRegion ) ) as HouseRegion;
if ( r != null && r.House != null && !r.House.IsFriend( Caster ) )
return;
if ( !map.CanSpawnMobile( p.X, p.Y, p.Z ) )
{
Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
}
else if ( SpellHelper.CheckTown( p, Caster ) && CheckSequence() )
{
TimeSpan duration = TimeSpan.FromSeconds( Caster.Skills.Spellweaving.Value / 24 + 25 + FocusLevel * 2 );
NatureFury nf = new NatureFury();
BaseCreature.Summon( nf, false, Caster, p, 0x5CB, duration );
new InternalTimer( nf ).Start();
}
FinishSequence();
}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:29,代码来源:NatureFury.cs
示例14: Target
public void Target(IPoint3D p)
{
if (!Caster.CanSee(p))
{
Caster.SendLocalizedMessage(500237); // Target can not be seen.
}
else if (SpellHelper.CheckTown(p, Caster) && CheckSequence())
{
SpellHelper.Turn(Caster, p);
SpellHelper.GetSurfaceTop(ref p);
Effects.PlaySound(p, Caster.Map, 0x1DD);
IEntity to = new Entity(Serial.Zero, new Point3D(p), Caster.Map);
Effects.SendMovingParticles(Caster, to, 0xf53, 1, 0, false, false, 33, 3, 1260, 1, 0, EffectLayer.Head, 0x100);
Point3D loc = new Point3D(p.X, p.Y, p.Z);
NaturalFire fire = new NaturalFire(Caster.Location, Caster.Map, Caster);
fire.MoveToWorld(loc, Caster.Map);
}
FinishSequence();
}
开发者ID:evildude807,项目名称:kaltar,代码行数:26,代码来源:IgniteSpell.cs
示例15: CouldFit
public bool CouldFit(IPoint3D p, Map map)
{
HouseTeleporterDeed deed = new HouseTeleporterDeed();
bool res = deed.CouldFit(p, map);
deed.Delete();
return res;
}
开发者ID:ITLongwell,项目名称:aedilis2server,代码行数:7,代码来源:AddonHouseTeleporter.cs
示例16: Path
private static void Path( Mobile from, IPoint3D p, PathAlgorithm alg, string name, int zOffset )
{
m_OverrideAlgorithm = alg;
long start = DateTime.Now.Ticks;
MovementPath path = new MovementPath( from, new Point3D( p ) );
long end = DateTime.Now.Ticks;
double len = Math.Round( (end-start) / 10000.0, 2 );
if ( !path.Success )
{
from.SendMessage( "{0} path failed: {1}ms", name, len );
}
else
{
from.SendMessage( "{0} path success: {1}ms", name, len );
int x = from.X;
int y = from.Y;
int z = from.Z;
for ( int i = 0; i < path.Directions.Length; ++i )
{
Movement.Movement.Offset( path.Directions[i], ref x, ref y );
new RecallRune().MoveToWorld( new Point3D( x, y, z+zOffset ), from.Map );
}
}
}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:29,代码来源:MovementPath.cs
示例17: Cylinder3D
public Cylinder3D(IPoint3D center, int radius, bool hollow, bool endCaps)
: base(center)
{
_Radius = radius;
_Hollow = hollow;
_EndCaps = endCaps;
}
开发者ID:Vita-Nex,项目名称:Core,代码行数:7,代码来源:Cylinder3D.cs
示例18: PlaySound
public static void PlaySound( IPoint3D p, Map map, int soundID )
{
if ( soundID <= -1 )
return;
if ( map != null )
{
Packet playSound = null;
IPooledEnumerable eable = map.GetClientsInRange( new Point3D( p ) );
foreach ( NetState state in eable )
{
state.Mobile.ProcessDelta();
if ( playSound == null )
playSound = Packet.Acquire( new PlaySound( soundID, p ) );
state.Send( playSound );
}
Packet.Release( playSound );
eable.Free();
}
}
开发者ID:greeduomacro,项目名称:liberdade-uo-server,代码行数:26,代码来源:Effects.cs
示例19: Target
public void Target( IPoint3D p )
{
IPoint3D orig = p;
Map map = Caster.Map;
SpellHelper.GetSurfaceTop( ref p );
if ( Factions.Sigil.ExistsOn( Caster ) )
{
Caster.SendLocalizedMessage( 1061632 ); // You can't do that while carrying the sigil.
}
else if ( Server.Misc.WeightOverloading.IsOverloaded( Caster ) )
{
Caster.SendLocalizedMessage( 502359, "", 0x22 ); // Thou art too encumbered to move.
}
else if ( !SpellHelper.CheckTravel( Caster, TravelCheckType.TeleportFrom ) )
{
}
else if ( !SpellHelper.CheckTravel( Caster, map, new Point3D( p ), TravelCheckType.TeleportTo ) && ( Caster.Location.X != p.X || Caster.Location.Y != p.Y || Caster.Location.Z > p.Z) )
{
}
else if( EnergyField(Caster.Location, new Point3D(p)))
{
SpellHelper.SendInvalidMessage(Caster, TravelCheckType.TeleportTo);
}
else if ( map == null || !map.CanSpawnMobile( p.X, p.Y, p.Z ) )
{
Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
}
else if ( SpellHelper.CheckMulti( new Point3D( p ), map ) )
{
Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
}
else if ( CheckSequence() )
{
SpellHelper.Turn( Caster, orig );
Mobile m = Caster;
Point3D from = m.Location;
Point3D to = new Point3D( p );
m.Location = to;
m.ProcessDelta();
if ( m.Player )
{
Effects.SendLocationParticles( EffectItem.Create( from, m.Map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 2023 );
Effects.SendLocationParticles( EffectItem.Create( to, m.Map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 5023 );
}
else
{
m.FixedParticles( 0x376A, 9, 32, 0x13AF, EffectLayer.Waist );
}
m.PlaySound( 0x1FE );
}
FinishSequence();
}
开发者ID:guy489,项目名称:runuot2a,代码行数:60,代码来源:Teleport.cs
示例20: Target
public void Target( IPoint3D p )
{
if ( !Caster.CanSee( p ) )
{
Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
}
else if ( CheckSequence() )
{
// Scriptiz : si monstre, il ne perd pas de Mana !
if (!(Caster is PlayerMobile)) Caster.Mana += 70;
SpellHelper.Turn( Caster, p );
SpellHelper.GetSurfaceTop( ref p );
List<Mobile> targets = new List<Mobile>();
Map map = Caster.Map;
if ( map != null )
{
IPooledEnumerable eable = map.GetMobilesInRange( new Point3D( p ), 8 );
foreach ( Mobile m in eable )
if ( m is BaseCreature && (m as BaseCreature).IsDispellable && Caster.CanBeHarmful( m, false ) )
targets.Add( m );
eable.Free();
}
for ( int i = 0; i < targets.Count; ++i )
{
Mobile m = targets[i];
BaseCreature bc = m as BaseCreature;
if ( bc == null )
continue;
double dispelChance = (50.0 + ((100 * (Caster.Skills.Magery.Value - bc.DispelDifficulty)) / (bc.DispelFocus*2))) / 100;
if ( dispelChance > Utility.RandomDouble() )
{
Effects.SendLocationParticles( EffectItem.Create( m.Location, m.Map, EffectItem.DefaultDuration ), 0x3728, 8, 20, 5042 );
Effects.PlaySound( m, m.Map, 0x201 );
m.Delete();
}
else
{
Caster.DoHarmful( m );
m.FixedEffect( 0x3779, 10, 20 );
}
}
}
FinishSequence();
}
开发者ID:greeduomacro,项目名称:vivre-uo,代码行数:59,代码来源:MassDispel.cs
注:本文中的IPoint3D类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论