當前位置: 首頁>>代碼示例>>C#>>正文


C# AIHeroClient.GetPath方法代碼示例

本文整理匯總了C#中AIHeroClient.GetPath方法的典型用法代碼示例。如果您正苦於以下問題:C# AIHeroClient.GetPath方法的具體用法?C# AIHeroClient.GetPath怎麽用?C# AIHeroClient.GetPath使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在AIHeroClient的用法示例。


在下文中一共展示了AIHeroClient.GetPath方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: GetPath

 public static float GetPath(AIHeroClient hero, Vector3 b)
 {
     var path = hero.GetPath(b);
     var lastPoint = path[0];
     var distance = 0f;
     foreach (var point in path.Where(point => !point.Equals(lastPoint)))
     {
         distance += lastPoint.LSDistance(point);
         lastPoint = point;
     }
     return distance;
 }
開發者ID:CONANLXF,項目名稱:AIO,代碼行數:12,代碼來源:Environment.cs

示例2: GetPointAfterTimeFromPath

 public static Vector3 GetPointAfterTimeFromPath(AIHeroClient hero, Vector3 b, float timeInSec)
 {
     var path = hero.GetPath(b);
     var lastPoint = path[0];
     var distance = 0f;
     var maxDist = hero.MoveSpeed * timeInSec;
     foreach (var point in path.Where(point => !point.Equals(lastPoint)))
     {
         if (distance > maxDist)
         {
             break;
         }
         distance += lastPoint.LSDistance(point);
         lastPoint = point;
     }
     return lastPoint;
 }
開發者ID:CONANLXF,項目名稱:AIO,代碼行數:17,代碼來源:LastPositions.cs

示例3: IsPathSafeEx

        public bool IsPathSafeEx(Vector2 end, AIHeroClient hero = null)
        {
            hero = hero ?? Player.Instance;

            return IsPathSafeEx(hero.GetPath(end.To3DWorld(), true).ToVector2(), hero);
        }
開發者ID:stefsot,項目名稱:EloBuddyAddons,代碼行數:6,代碼來源:EvadePlus.cs

示例4: GetPath

 public static float GetPath(AIHeroClient hero, Vector3 b)
 {
     var path = hero.GetPath(b);
     Vector3[] lastPoint = {path[0]};
     var distance = 0f;
     foreach (var point in path.Where(point => !point.Equals(lastPoint[0])))
     {
         distance += Extensions.Distance(lastPoint[0], point);
         lastPoint[0] = point;
     }
     return distance;
 }
開發者ID:Xelamats,項目名稱:PortAIO,代碼行數:12,代碼來源:LastPositions.cs


注:本文中的AIHeroClient.GetPath方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。