本文整理汇总了C#中System.Item.MoveToWorld方法的典型用法代码示例。如果您正苦于以下问题:C# Item.MoveToWorld方法的具体用法?C# Item.MoveToWorld怎么用?C# Item.MoveToWorld使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Item
的用法示例。
在下文中一共展示了Item.MoveToWorld方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PlaceFakeGate_Callback
private static void PlaceFakeGate_Callback(object m)
{
Mobile from = m as Mobile;
if ( from == null || from.Deleted )
return;
Item gate = new Item();
gate.ItemID = 3948;
gate.Hue = 37;
gate.Movable = false;
gate.MoveToWorld(from.Location, from.Map);
if (from.Hidden)
Timer.DelayCall(TimeSpan.FromSeconds(0.5), new TimerStateCallback(ComeOutOfGate_Callback), new object[] { from, gate });
else
Timer.DelayCall(TimeSpan.FromSeconds(0.5), new TimerStateCallback(ChangeDirection_Callback), new object[] { from, gate });
}
示例2: AddLeverPuzzlePart
public static Item AddLeverPuzzlePart(int[] Loc, Item newitem)
{
if (newitem == null || newitem.Deleted)
{
installed = false;
}
else
{
newitem.MoveToWorld(new Point3D(Loc[0], Loc[1], Loc[2]), Map.Malas);
}
return newitem;
}
示例3: AddRug_Callback
public static void AddRug_Callback(Mobile from, Map map, Point3D start, Point3D end, object state)
{
Rug tr = (Rug)state;
int height = end.Y - start.Y + 1;
int width = end.X - start.X + 1;
Item item;
for (int x = 0; x < width; x++)
{
int xcord = start.X + x;
for (int y = 0; y < height; y++)
{
int ycord = start.Y + y;
item = new Item();
if (xcord == start.X)
{
if (ycord == start.Y)
item.ItemID = tr.Top;
else if (ycord == end.Y)
item.ItemID = tr.Left;
else
item.ItemID = tr.West;
}
else if (ycord == start.Y)
{
if (xcord == end.X)
item.ItemID = tr.Right;
else
item.ItemID = tr.North;
}
else if (xcord == end.X)
{
if (ycord == end.Y)
item.ItemID = tr.Bottom;
else
item.ItemID = tr.East;
}
else if (ycord == end.Y)
item.ItemID = tr.South;
else
item.ItemID = tr.Center;
item.Movable = false;
item.MoveToWorld(new Point3D(xcord, ycord, start.Z), map);
}
}
}