当前位置: 首页>>代码示例>>C#>>正文


C# Item.MoveToWorld方法代码示例

本文整理汇总了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 });
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:17,代码来源:MinkHide.cs

示例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;
 }
开发者ID:bittiez,项目名称:ServUO,代码行数:12,代码来源:LeverPuzzleController.cs

示例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);
                }
            }
        }
开发者ID:greeduomacro,项目名称:last-wish,代码行数:52,代码来源:AddRug.cs


注:本文中的System.Item.MoveToWorld方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。