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


C# AIHeroClient.GetPassiveStatus方法代碼示例

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


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

示例1: getQPassivedelay

 private static float getQPassivedelay(AIHeroClient target)
 {
     if (target == null)
         return 0;
     PassiveStatus targetStatus;
     if (LeagueSharp.Common.Prediction.GetPrediction(target, 0.25f).UnitPosition.LSTo2D().LSDistance(Player.Position.LSTo2D())
         > Player.Position.LSTo2D().LSDistance(target.Position.LSTo2D()))
         targetStatus = target.GetPassiveStatus(Player.Position.LSTo2D().LSDistance(target.Position.LSTo2D()) / 1100);
     else
         targetStatus = target.GetPassiveStatus(0);
     if (!targetStatus.HasPassive)
         return 0;
     if (targetStatus.PassiveType == PassiveType.PrePassive || targetStatus.PassiveType == PassiveType.NormalPassive)
     {
         if (!targetStatus.PassivePredictedPositions.Any())
             return 0;
         var pos = targetStatus.PassivePredictedPositions.First();
         return Player.Position.LSTo2D().LSDistance(pos) / 1100 + Game.Ping / 1000;
     }
     if (targetStatus.PassiveType == PassiveType.UltiPassive)
     {
         if (!targetStatus.PassivePredictedPositions.Any())
             return 0;
         var poses = targetStatus.PassivePredictedPositions;
         var pos = poses.OrderBy(x => Player.Position.LSTo2D().LSDistance(x)).First();
         return Player.Position.LSTo2D().LSDistance(pos) / 1100 + Game.Ping / 1000;
     }
     return 0;
 }
開發者ID:yMeliodasNTD,項目名稱:PortAIO,代碼行數:29,代碼來源:Combos.cs

示例2: castQtoUltPassive

 private static bool castQtoUltPassive(AIHeroClient target, float delay)
 {
     if (target == null)
         return false;
     var targetStatus = target.GetPassiveStatus(delay);
     if (!targetStatus.HasPassive || targetStatus.PassiveType != PassiveType.UltiPassive)
         return false;
     if (targetStatus.PassiveType != PassiveType.UltiPassive)
         return false;
     if (!targetStatus.PassivePredictedPositions.Any())
         return false;
     var passiveposes = targetStatus.PassivePredictedPositions;
     var passivepos = passiveposes.OrderBy(x => Player.Position.LSTo2D().LSDistance(x)).First();
     var poses = GetRadiusPoints(targetStatus.TargetPredictedPosition, passivepos);
     var pos = poses.Where(x => x.LSDistance(Player.Position.LSTo2D()) <= 400 && !x.LSIsWall())
                    .OrderBy(x => x.LSDistance(passivepos)).FirstOrDefault();
     if (pos == null || !pos.IsValid())
         return false;
     Q.Cast(pos);
     return true;
 }
開發者ID:yMeliodasNTD,項目名稱:PortAIO,代碼行數:21,代碼來源:Combos.cs

示例3: GetFastDamage

 public static float GetFastDamage(AIHeroClient target)
 {
     //var statuss = target.GetPassiveStatus(0);
     //if (statuss.HasPassive)
     //{
     //    return statuss.PassivePredictedPositions.Count() * (float)(GetPassiveDamage(target) + Player.GetAutoAttackDamage(target));
     //}
     //return 0;
     ////
     float damage = 0;
     damage += Q.GetDamage(target);
     if (Q.IsReady())
         damage += Q.GetDamage(target);
     if (R.IsReady())
     {
         damage += GetUltiDamage(target);
         return damage;
     }
     else
     {
         var status = target.GetPassiveStatus(0);
         if (status.HasPassive)
         {
             damage += status.PassivePredictedPositions.Count() * (float)(GetPassiveDamage(target) + Player.LSGetAutoAttackDamage(target));
             if (status.PassivePredictedPositions.Count() < 3)
                 damage += (3 - status.PassivePredictedPositions.Count()) * (float)Player.LSGetAutoAttackDamage(target);
             return damage;
         }
         else
         {
             damage += (float)Player.LSGetAutoAttackDamage(target) * 2;
             return damage;
         }
     }
 }
開發者ID:yMeliodasNTD,項目名稱:PortAIO,代碼行數:35,代碼來源:Combos.cs


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