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


C# AttackableUnit.BadaoIsValidTarget方法代码示例

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


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

示例1: Orbwalking_OnAttack

 private static void Orbwalking_OnAttack(AttackableUnit unit, AttackableUnit target)
 {
     if (!unit.IsMe || BadaoMainVariables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo)
         return;
     if (Utils.GameTimeTickCount - BadaoMissFortuneVariables.Rcount <= 500)
         return;
     if (ObjectManager.Player.IsCastingInterruptableSpell())
     {
         return;
     }
     if (BadaoMissFortuneHelper.UseWCombo() && target.BadaoIsValidTarget() && target is Obj_AI_Hero)
     {
         BadaoMainVariables.W.Cast();
     }
 }
开发者ID:badao,项目名称:BadaoKingdomTest,代码行数:15,代码来源:BadaoMissFortuneCombo.cs

示例2: Orbwalking_OnAttack

 private static void Orbwalking_OnAttack(AttackableUnit unit, AttackableUnit target)
 {
     if (!unit.IsMe || BadaoMainVariables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.LaneClear
         || !(target is Obj_AI_Minion) || target.Team != GameObjectTeam.Neutral)
         return;
     if (Utils.GameTimeTickCount - BadaoMissFortuneVariables.Rcount <= 500)
         return;
     if (ObjectManager.Player.IsCastingInterruptableSpell())
     {
         return;
     }
     if (!BadaoMissFortuneHelper.CanJungleClearMana())
         return;
     if (BadaoMissFortuneHelper.UseWJungleClear() && target.BadaoIsValidTarget())
     {
         BadaoMainVariables.W.Cast();
     }
 }
开发者ID:badao,项目名称:BadaoKingdomTest,代码行数:18,代码来源:BadaoMissFortuneJungleClear.cs

示例3: Orbwalking_AfterAttack

 private static void Orbwalking_AfterAttack(AttackableUnit unit, AttackableUnit target)
 {
     if (BadaoMainVariables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo)
         return;
     if (Utils.GameTimeTickCount - BadaoMissFortuneVariables.Rcount <= 500)
         return;
     if (ObjectManager.Player.IsCastingInterruptableSpell())
     {
         return;
     }
     if (BadaoMissFortuneHelper.UseRCombo() && unit.IsMe 
         && target.BadaoIsValidTarget() &&
         target is Obj_AI_Hero && BadaoMissFortuneHelper.Rdamepior() 
         && target.Health <= 0.6f*BadaoMissFortuneHelper.RDamage(target as Obj_AI_Base))
     {
         float reactiontime = 0.5f;
         var PredTarget = Prediction.GetPrediction(target as Obj_AI_Base, 0.25f + Game.Ping/1000f);
         Vector2 x1 = new Vector2();
         Vector2 x2 = new Vector2();
         Vector2 CenterPolar = new Vector2();
         Vector2 CenterEnd = new Vector2();
         BadaoMissFortuneHelper.RPrediction(PredTarget.UnitPosition.To2D(), target as Obj_AI_Base,
             out CenterPolar, out CenterEnd, out x1, out x2);
         float dis1 = PredTarget.UnitPosition.To2D().Distance(x1);
         float dis2 = PredTarget.UnitPosition.To2D().Distance(x2);
         Obj_AI_Hero Target = target as Obj_AI_Hero;
         if (PredTarget.UnitPosition.To2D().Distance(ObjectManager.Player.Position.To2D()) >= 250 &&
             (Target.HasBuffOfType(BuffType.Stun) || Target.HasBuffOfType(BuffType.Snare) ||
             (dis1 >= dis2 && (dis2 / Target.MoveSpeed >= 0.6f * 3f - reactiontime ||
             BadaoMissFortuneHelper.RDamage(Target) * (dis2 / Target.MoveSpeed + reactiontime)/ 3f >= Target.Health
             - BadaoMissFortuneHelper.GetAADamage(Target)))))
         {
             BadaoMainVariables.R.Cast(PredTarget.UnitPosition.To2D());
             BadaoMissFortuneVariables.TargetRChanneling = target as Obj_AI_Hero;
             BadaoMissFortuneVariables.CenterPolar = CenterPolar;
             BadaoMissFortuneVariables.CenterEnd = CenterEnd;
         }
         else if (PredTarget.UnitPosition.To2D().Distance(ObjectManager.Player.Position.To2D()) >= 250 &&
                 (Target.HasBuffOfType(BuffType.Stun) || Target.HasBuffOfType(BuffType.Snare) ||
                 (dis2 >= dis1 && (dis1 / Target.MoveSpeed >= 0.6f * 3f - reactiontime ||
                 BadaoMissFortuneHelper.RDamage(Target)* (dis1 / Target.MoveSpeed + reactiontime)/3f >= Target.Health
                 - BadaoMissFortuneHelper.GetAADamage(Target)))))
         {
             BadaoMainVariables.R.Cast(PredTarget.UnitPosition.To2D());
             BadaoMissFortuneVariables.TargetRChanneling = target as Obj_AI_Hero;
             BadaoMissFortuneVariables.CenterPolar = CenterPolar;
             BadaoMissFortuneVariables.CenterEnd = CenterEnd;
         }
     }
     if (BadaoMissFortuneHelper.UseRComboWise() && unit.IsMe
         && target.BadaoIsValidTarget() &&
         target is Obj_AI_Hero && BadaoMissFortuneHelper.Rdamepior()
         && target.Health <= 0.8f * BadaoMissFortuneHelper.RDamage(target as Obj_AI_Base))
     {
         float reactiontime = 1f;
         var PredTarget = Prediction.GetPrediction(target as Obj_AI_Base, 0.25f + Game.Ping / 1000f);
         Vector2 x1 = new Vector2();
         Vector2 x2 = new Vector2();
         Vector2 CenterPolar = new Vector2();
         Vector2 CenterEnd = new Vector2();
         BadaoMissFortuneHelper.RPrediction(PredTarget.UnitPosition.To2D(), target as Obj_AI_Base,
             out CenterPolar, out CenterEnd, out x1, out x2);
         float dis1 = PredTarget.UnitPosition.To2D().Distance(x1);
         float dis2 = PredTarget.UnitPosition.To2D().Distance(x2);
         Obj_AI_Hero Target = target as Obj_AI_Hero;
         if (PredTarget.UnitPosition.To2D().Distance(ObjectManager.Player.Position.To2D()) >= 250 &&
             (Target.HasBuffOfType(BuffType.Stun) || Target.HasBuffOfType(BuffType.Snare) ||
             (dis1 >= dis2 && (dis2 / Target.MoveSpeed >= 0.8f * 3f - reactiontime ||
             BadaoMissFortuneHelper.RDamage(Target) * (dis2 / Target.MoveSpeed + reactiontime) / 3f >= Target.Health
             - BadaoMissFortuneHelper.GetAADamage(Target)))))
         {
             BadaoMainVariables.R.Cast(PredTarget.UnitPosition.To2D());
             BadaoMissFortuneVariables.TargetRChanneling = target as Obj_AI_Hero;
             BadaoMissFortuneVariables.CenterPolar = CenterPolar;
             BadaoMissFortuneVariables.CenterEnd = CenterEnd;
         }
         else if (PredTarget.UnitPosition.To2D().Distance(ObjectManager.Player.Position.To2D()) >= 250 &&
                 (Target.HasBuffOfType(BuffType.Stun) || Target.HasBuffOfType(BuffType.Snare) ||
                 (dis2 >= dis1 && (dis1 / Target.MoveSpeed >= 0.8f * 3f - reactiontime ||
                 BadaoMissFortuneHelper.RDamage(Target) * (dis1 / Target.MoveSpeed + reactiontime) / 3f >= Target.Health
                 - BadaoMissFortuneHelper.GetAADamage(Target)))))
         {
             BadaoMainVariables.R.Cast(PredTarget.UnitPosition.To2D());
             BadaoMissFortuneVariables.TargetRChanneling = target as Obj_AI_Hero;
             BadaoMissFortuneVariables.CenterPolar = CenterPolar;
             BadaoMissFortuneVariables.CenterEnd = CenterEnd;
         }
     }
 }
开发者ID:badao,项目名称:BadaoKingdomTest,代码行数:89,代码来源:BadaoMissFortuneCombo.cs


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