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


C# WorldObject.Wrap方法代码示例

本文整理汇总了C#中WorldObject.Wrap方法的典型用法代码示例。如果您正苦于以下问题:C# WorldObject.Wrap方法的具体用法?C# WorldObject.Wrap怎么用?C# WorldObject.Wrap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WorldObject的用法示例。


在下文中一共展示了WorldObject.Wrap方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetDistance

 /// <summary>
 /// This function will return the distance in meters.
 /// The manual distance units are in map compass units, while the distance units used in the UI are meters.
 /// In AC there are 240 meters in a kilometer; thus if you set your attack range to 1 in the UI it
 /// will showas 0.00416666666666667in the manual options (0.00416666666666667 being 1/240). 
 /// </summary>
 /// <param name="obj1"></param>
 /// <param name="obj2"></param>
 /// <returns></returns>
 /// <exception cref="ArgumentOutOfRangeException">Object passed with an Id of 0</exception>
 public static double GetDistance(WorldObject obj1, WorldObject obj2)
 {
     return GetDistance(obj1.Wrap(), obj2.Wrap());
 }
开发者ID:mrvoorhe,项目名称:redox-extensions,代码行数:14,代码来源:WorldUtilities.cs

示例2: GetDistanceFromSelf

 /// <summary>
 /// This function will return the distance in meters.
 /// The manual distance units are in map compass units, while the distance units used in the UI are meters.
 /// In AC there are 240 meters in a kilometer; thus if you set your attack range to 1 in the UI it
 /// will showas 0.00416666666666667in the manual options (0.00416666666666667 being 1/240). 
 /// </summary>
 /// <param name="destObj"></param>
 /// <returns></returns>
 /// <exception cref="ArgumentOutOfRangeException">CharacterFilder.Id or Object passed with an Id of 0</exception>
 public static double GetDistanceFromSelf(WorldObject destObj)
 {
     return GetDistanceFromSelf(destObj.Wrap());
 }
开发者ID:mrvoorhe,项目名称:redox-extensions,代码行数:13,代码来源:WorldUtilities.cs


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