本文整理汇总了C#中AttackableUnit.IsValidTarget方法的典型用法代码示例。如果您正苦于以下问题:C# AttackableUnit.IsValidTarget方法的具体用法?C# AttackableUnit.IsValidTarget怎么用?C# AttackableUnit.IsValidTarget使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AttackableUnit
的用法示例。
在下文中一共展示了AttackableUnit.IsValidTarget方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Orbwalking_AfterAttack
private void Orbwalking_AfterAttack(AttackableUnit unit, AttackableUnit target)
{
if (unit.IsMe)
if (target.Type == GameObjectType.obj_AI_Hero)
switch (MenuProvider.Orbwalker.ActiveMode)
{
case Orbwalking.OrbwalkingMode.LastHit:
break;
case Orbwalking.OrbwalkingMode.Mixed:
break;
case Orbwalking.OrbwalkingMode.LaneClear:
break;
case Orbwalking.OrbwalkingMode.Combo:
if (MenuProvider.Champion.Combo.UseQ)
if (target.IsValidTarget(_q.Range))
if (_q.IsReadyPerfectly())
_q.CastOnUnit(target as Obj_AI_Base);
break;
case Orbwalking.OrbwalkingMode.None:
if (MenuProvider.Champion.Harass.UseQ)
if (target.IsValidTarget(_q.Range))
if (_q.IsReadyPerfectly())
_q.CastOnUnit(target as Obj_AI_Base);
break;
default:
break;
}
}
示例2: OnAfterAttack
protected override void OnAfterAttack(AttackableUnit unit, AttackableUnit target)
{
if (!unit.IsMe) return;
if (unit.IsMe)
{
if (myOrbwalker.ActiveMode == myOrbwalker.OrbwalkingMode.Combo)
{
if (config.Item("UseWCombo").GetValue<bool>() &&
!Player.IsWindingUp &&
W.IsReady() &&
target.IsValidTarget() && Orbwalking.InAutoAttackRange(target)) W.Cast();
}
if (myOrbwalker.ActiveMode == myOrbwalker.OrbwalkingMode.Harass)
{
if (config.Item("UseWHarass").GetValue<bool>() &&
!Player.IsWindingUp &&
W.IsReady() &&
target.IsValidTarget() && Orbwalking.InAutoAttackRange(target)) W.Cast();
}
if (myOrbwalker.ActiveMode == myOrbwalker.OrbwalkingMode.JungleClear)
{
if (target is Obj_AI_Minion && target.Team == GameObjectTeam.Neutral && !target.Name.Contains("Mini") &&
!Player.IsWindingUp && Orbwalking.InAutoAttackRange(target))
{
if (W.IsReady() && config.Item("UseWJFarm").GetValue<bool>()) W.Cast();
}
}
}
}
示例3: OnAfterAttack
protected override void OnAfterAttack(AttackableUnit unit, AttackableUnit target)
{
if (!unit.IsMe) return;
if (unit.IsMe && !Player.IsWindingUp && E.IsReady() && target.IsValidTarget())
{
if (myOrbwalker.ActiveMode == myOrbwalker.OrbwalkingMode.Combo && target is Obj_AI_Hero)
{
if (config.Item("UseECombo").GetValue<bool>()) E.Cast();
}
if (myOrbwalker.ActiveMode == myOrbwalker.OrbwalkingMode.Harass && target is Obj_AI_Hero)
{
if (config.Item("UseEHarass").GetValue<bool>()) E.Cast();
}
if (myOrbwalker.ActiveMode == myOrbwalker.OrbwalkingMode.LaneClear && target is Obj_AI_Minion)
{
if (config.Item("UseEFarm").GetValue<bool>() && (myUtility.PlayerManaPercentage > config.Item("FarmMana").GetValue<Slider>().Value)) E.Cast();
}
if (myOrbwalker.ActiveMode == myOrbwalker.OrbwalkingMode.LaneClear)
{
if (target is Obj_AI_Turret && target.Team != Player.Team &&
config.Item("UseEMisc").GetValue<bool>() &&
!Player.IsWindingUp && Orbwalking.InAutoAttackRange(target))
{
E.Cast();
}
}
}
}
示例4: OrbwalkingOnAfterAttack
private static void OrbwalkingOnAfterAttack(AttackableUnit unit, AttackableUnit target)
{
if (!unit.IsMe)
{
return;
}
if (!(target is Obj_AI_Hero))
{
return;
}
if (!target.IsValidTarget())
{
return;
}
if (Hydra.IsReady())
{
Hydra.Cast();
}
else if (Tiamat.IsReady())
{
Tiamat.Cast();
}
}
示例5: GetRealAutoAttackRange
internal static float GetRealAutoAttackRange(this AttackableUnit unit, AttackableUnit target, int AutoAttackRange)
{
float result = AutoAttackRange + unit.BoundingRadius;
if (target.IsValidTarget())
return result + target.BoundingRadius;
return result;
}
示例6: AfterAttack
private void AfterAttack(AttackableUnit unit, AttackableUnit target)
{
if (!unit.IsMe || !unit.IsValid<Obj_AI_Base>())
{
return;
}
if (Variables.Spells[SpellSlot.Q].IsEnabledAndReady(ModesMenuExtensions.Mode.Combo)
|| (Variables.Spells[SpellSlot.Q].IsEnabledAndReady(ModesMenuExtensions.Mode.Harrass)
&& ObjectManager.Player.ManaPercent >= Variables.AssemblyMenu.GetItemValue<Slider>("dzaio.champion.extra.mixed.mana").Value))
{
if (target.IsValid<Obj_AI_Hero>() && target.IsValidTarget())
{
Variables.Spells[SpellSlot.Q].CastIfHitchanceEquals(target as Obj_AI_Hero, HitChance.High);
}
}
if (Variables.Spells[SpellSlot.W].IsEnabledAndReady(ModesMenuExtensions.Mode.Combo)
|| (Variables.Spells[SpellSlot.W].IsEnabledAndReady(ModesMenuExtensions.Mode.Harrass)
&& ObjectManager.Player.ManaPercent >= Variables.AssemblyMenu.GetItemValue<Slider>("dzaio.champion.extra.mixed.mana").Value))
{
if (target.IsValid<Obj_AI_Hero>() && target.IsValidTarget())
{
Variables.Spells[SpellSlot.W].CastIfHitchanceEquals(target as Obj_AI_Hero, HitChance.High);
}
}
}
示例7: AfterAttack
internal static void AfterAttack(AttackableUnit unit, AttackableUnit target)
{
if (target.IsValidTarget() && unit.IsValid<Obj_AI_Hero>() && unit.IsMe)
{
LastTarget = target;
}
}
示例8: CustomInAutoattackRange
public int CustomInAutoattackRange(AttackableUnit target)
{
if (Orbwalking.InAutoAttackRange(target))
{
return 1;
}
if (!target.IsValidTarget())
{
return 0;
}
//Azir's soldiers can't attack structures.
if (!(target is Obj_AI_Base))
{
return 0;
}
var soldierAArange = _soldierAARange + 65 + target.BoundingRadius;
soldierAArange *= soldierAArange;
foreach (var soldier in SoldiersManager.ActiveSoldiers)
{
if (soldier.Distance(target, true) <= soldierAArange)
{
return 2;
}
}
return 0;
}
示例9: OnAfterAttack
protected override void OnAfterAttack(AttackableUnit unit, AttackableUnit target)
{
if (!unit.IsMe) return;
if (unit.IsMe )
{
if (target is Obj_AI_Hero && target.IsValid<Obj_AI_Hero>() && target.IsValidTarget())
{
if (myOrbwalker.ActiveMode == myOrbwalker.OrbwalkingMode.Combo)
{
if (config.Item("UseItemCombo").GetValue<bool>() && !Player.IsWindingUp)
{
myUtility.UseItems(2, null);
}
if (config.Item("UseQCombo").GetValue<bool>() && !Player.IsWindingUp && Orbwalking.InAutoAttackRange(target) && Q.IsReady())
{
Q.Cast();
}
}
}
if (myOrbwalker.ActiveMode == myOrbwalker.OrbwalkingMode.LaneClear)
{
if (target is Obj_AI_Turret && target.Team != Player.Team &&
config.Item("UseQMisc").GetValue<bool>() &&
!Player.IsWindingUp && Orbwalking.InAutoAttackRange(target) && Q.IsReady())
{
Q.Cast();
}
}
}
}
示例10: AfterAttack
private static void AfterAttack(AttackableUnit unit, AttackableUnit target)
{
if (GravesMenu.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && Helper.Enabled("graves.e.combo") && GravesSpells.E.IsReady()
&& target.IsValidTarget(GravesSpells.Q.Range))
{
GravesSpells.E.Cast(Game.CursorPos);
}
}
示例11: CorkiAfterAttack
private static void CorkiAfterAttack(AttackableUnit unit, AttackableUnit target)
{
if (CorkiMenu.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && Helper.CEnabled("corki.e.combo") && CorkiSpells.E.IsReady()
&& target.IsValidTarget(CorkiSpells.E.Range-100))
{
CorkiSpells.E.Cast(target.Position);
}
}
示例12: AfterAttack
private static void AfterAttack(AttackableUnit unit, AttackableUnit target)
{
if (SivirMenu.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && Helper.SEnabled("sivir.w.combo") && SivirSpells.W.IsReady()
&& target.IsValidTarget(SivirSpells.W.Range))
{
SivirSpells.W.Cast();
}
}
示例13: OnPreAttack
private static void OnPreAttack(AttackableUnit target, Orbwalker.PreAttackArgs args)
{
if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) return;
if (Q.IsReady() && target.IsValidTarget(Q.Range) && !target.IsZombie)
{
Q.Cast(target.Position);
}
}
示例14: Tumble
public static void Tumble(this Vector3 to, AttackableUnit afterTumbleTarget)
{
Player.CastSpell(SpellSlot.Q, to);
if (afterTumbleTarget != null && afterTumbleTarget.IsValidTarget(Player.Instance.GetAutoAttackRange()))
{
Player.IssueOrder(GameObjectOrder.AttackUnit, afterTumbleTarget);
}
}
示例15: InAARange
/// <summary>
/// Checks if target is in unit's auto attack range
/// </summary>
/// <param name="target">Target</param>
/// <param name="_unit">Unit to check range</param>
/// <returns>true if in auto attack range</returns>
public static bool InAARange(AttackableUnit target, Obj_AI_Base _unit = null)
{
if (!target.IsValidTarget())
return false;
Obj_AI_Base unit = CorrectUnit(_unit);
float range = GetRealAARange(target, _unit);
return Vector2.DistanceSquared(target.Position.To2D(), unit.ServerPosition.To2D()) <= range * range;
}