本文整理汇总了C#中LeagueSharp.CanLastHit方法的典型用法代码示例。如果您正苦于以下问题:C# LeagueSharp.CanLastHit方法的具体用法?C# LeagueSharp.CanLastHit怎么用?C# LeagueSharp.CanLastHit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LeagueSharp
的用法示例。
在下文中一共展示了LeagueSharp.CanLastHit方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CastQKill
private static bool CastQKill(LeagueSharp.SDK.Spell spell, Obj_AI_Base target)
{
var pred1 = spell.GetPrediction(target, false, -1, CollisionableObjects.YasuoWall);
if (pred1.Hitchance < Q.MinHitChance)
{
return false;
}
var pred2 = spell.GetPrediction(
target,
false,
-1,
CollisionableObjects.Heroes | CollisionableObjects.Minions);
if (pred2.Hitchance == HitChance.Collision)
{
var subDmg = Q.GetDamage(target, DamageStage.SecondForm);
switch (target.Type)
{
case GameObjectType.AIHeroClient:
return target.Health + target.AttackShield <= subDmg && Q.Cast(pred1.CastPosition);
case GameObjectType.obj_AI_Minion:
return spell.CanLastHit(target, subDmg) && Q.Cast(pred1.CastPosition);
}
}
else if (pred2.Hitchance >= Q.MinHitChance)
{
return Q.Cast(pred2.CastPosition);
}
return false;
}
示例2: CastQKill
private static bool CastQKill(LeagueSharp.SDK.Spell spell, Obj_AI_Base target)
{
var pred = spell.GetPrediction(target, false, -1, LeagueSharp.SDK.CollisionableObjects.YasuoWall);
if (pred.Hitchance < Q.MinHitChance)
{
return false;
}
var col = pred.GetCollision(LeagueSharp.SDK.CollisionableObjects.Heroes | LeagueSharp.SDK.CollisionableObjects.Minions);
if (col.Count == 0)
{
Q.Cast(target);
return true;
}
var subDmg = Q.GetDamage(target, DamageStage.SecondForm);
if (target is AIHeroClient && target.Health + target.AttackShield <= subDmg)
{
Q.Cast(target);
return true;
}
return target is Obj_AI_Minion && spell.CanLastHit(target, subDmg) && Q.Cast(pred.CastPosition);
}