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


C# Obj_AI_Hero.GetPath方法代码示例

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


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

示例1: GetNeededMoveTimeHeavy

 public static float GetNeededMoveTimeHeavy(Obj_AI_Hero hero, Vector3 moveTo)
 {
     var path = hero.GetPath(moveTo);
     var time = (path[0] - hero.Position).Length() / hero.MoveSpeed;
     for (int i = 1; i < path.Length; i++)
         time += (path[i] - path[i - 1]).Length() / hero.MoveSpeed;
     return time;
 }
开发者ID:jayblah,项目名称:TheNinow,代码行数:8,代码来源:ObjectiveCommons.cs

示例2: GetNeededMoveTimeWithoutMsHeavy

 public static float GetNeededMoveTimeWithoutMsHeavy(Obj_AI_Hero hero, Vector3 moveTo)
 {
     Console.WriteLine(hero.Name);
     var path = hero.GetPath(moveTo);
     var time = (path[0] - hero.Position).Length();
     for (int i = 1; i < path.Length; i++)
         time += (path[i] - path[i - 1]).Length();
     return time;
 }
开发者ID:jayblah,项目名称:TheNinow,代码行数:9,代码来源:ObjectiveCommons.cs

示例3: GetPointAfterTimeFromPath

 public static Vector3 GetPointAfterTimeFromPath(Obj_AI_Hero 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.Distance(point);
         lastPoint = point;
     }
     return lastPoint;
 }
开发者ID:tolgahandereci,项目名称:LeagueSharp,代码行数:17,代码来源:LastPositions.cs

示例4: DrawWaypoint

 private void DrawWaypoint(Obj_AI_Hero hero, Vector3 endPos)
 {
     List<Vector3> waypoints = hero.GetPath(endPos).ToList();
     for (int i = 0; i < waypoints.Count - 1; i++)
     {
         Vector2 oWp = Drawing.WorldToScreen(waypoints[i]);
         Vector2 nWp = Drawing.WorldToScreen(waypoints[i + 1]);
         Drawing.DrawLine(oWp[0], oWp[1], nWp[0], nWp[1], 1, System.Drawing.Color.GreenYellow);
     }
 }
开发者ID:kampfi,项目名称:SAwarenessBeta,代码行数:10,代码来源:SmartPingImprove.cs

示例5: GetPath

 public static float GetPath(Obj_AI_Hero 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.Distance(point);
         lastPoint = point;
     }
     return distance;
 }
开发者ID:tolgahandereci,项目名称:LeagueSharp,代码行数:12,代码来源:LastPositions.cs


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