本文整理汇总了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());
}
示例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());
}