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


C# Vector3.DistanceToPlayer方法代码示例

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


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

示例1: CanDash

 private static bool CanDash(
     Obj_AI_Base target,
     bool inQCir = false,
     bool underTower = true,
     Vector3 pos = new Vector3())
 {
     if (HaveE(target))
     {
         return false;
     }
     if (!pos.IsValid())
     {
         pos = target.ServerPosition;
     }
     var posAfterE = GetPosAfterDash(target);
     return (underTower || !posAfterE.IsUnderEnemyTurret())
            && posAfterE.Distance(pos) < (inQCir ? Q3.Range : pos.DistanceToPlayer())
            && Evade.IsSafePoint(posAfterE.ToVector2()).IsSafe;
 }
开发者ID:Xelamats,项目名称:PortAIO,代码行数:19,代码来源:Yasuo.cs

示例2: DashCheck

 private static bool DashCheck(
     Obj_AI_Base target,
     bool inQCir = false,
     bool underTower = true,
     Vector3 pos = new Vector3())
 {
     if (!pos.IsValid())
     {
         pos = target.ServerPosition;
     }
     var posAfterE = PosAfterE(target);
     return CanCastE(target) && (underTower || !posAfterE.IsUnderEnemyTurret())
            && posAfterE.Distance(pos) <= (inQCir ? QCirWidth : pos.DistanceToPlayer())
            && Evade.IsSafePoint(posAfterE).IsSafe;
 }
开发者ID:47110572,项目名称:LeagueSharp-10,代码行数:15,代码来源:Yasuo.cs

示例3: Flee

 private static void Flee(Vector3 pos, bool isStar = false)
 {
     if (!W.IsReady() || !IsWOne || Variables.TickCount - W.LastCastAttemptT <= 1000)
     {
         return;
     }
     var objJump =
         GameObjects.AllyHeroes.Where(i => !i.IsMe)
             .Cast<Obj_AI_Base>()
             .Concat(
                 GameObjects.AllyMinions.Where(
                     i => i.IsMinion() || i.IsPet() || SpecialPet.Contains(i.CharData.BaseSkinName.ToLower()))
                     .Concat(GameObjects.AllyWards.Where(i => i.IsWard())))
             .Where(
                 i =>
                 i.IsValidTarget(W.Range, false)
                 && i.Distance(Player.ServerPosition.Extend(pos, Math.Min(pos.DistanceToPlayer(), W.Range)))
                 < (isStar ? R.Range - 50 : 250))
             .MinOrDefault(i => i.Distance(pos));
     if (objJump != null)
     {
         W.CastOnUnit(objJump);
     }
     else
     {
         WardManager.Place(pos, false, true);
     }
 }
开发者ID:47110572,项目名称:LeagueSharp-10,代码行数:28,代码来源:LeeSin.cs

示例4: Place

 internal static void Place(Vector3 pos, bool isInsecByWard = false, bool isFlee = false)
 {
     if (!CanWardJump)
     {
         return;
     }
     var ward = Common.GetWardSlot();
     if (ward == null)
     {
         return;
     }
     var posEnd = Player.ServerPosition.Extend(pos, Math.Min(pos.DistanceToPlayer(), WardRange));
     Player.Spellbook.CastSpell(ward.SpellSlot, posEnd);
     if (isInsecByWard)
     {
         LastPlaceTime = Variables.TickCount;
     }
     lastJumpPos = posEnd.ToVector2();
     lastJumpTime = Variables.TickCount;
     if (isFlee)
     {
         lastJumpTime += 1100;
     }
 }
开发者ID:47110572,项目名称:LeagueSharp-10,代码行数:24,代码来源:LeeSin.cs


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