本文整理匯總了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);
}
}
}