本文整理汇总了C#中Obj_AI_Hero类的典型用法代码示例。如果您正苦于以下问题:C# Obj_AI_Hero类的具体用法?C# Obj_AI_Hero怎么用?C# Obj_AI_Hero使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Obj_AI_Hero类属于命名空间,在下文中一共展示了Obj_AI_Hero类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: InitiatorArgs
public InitiatorArgs(Obj_AI_Hero hero, Vector3 start, Vector3 end, float range)
{
Hero = hero;
Start = start;
End = end;
Range = range;
}
开发者ID:4859aa,项目名称:LeagueSharp-Dev,代码行数:7,代码来源:InitiatorArgs.cs
示例2: BuffManagerArgs
public BuffManagerArgs(string uniqueId, Obj_AI_Hero hero, Vector3 position, float endTime)
{
UniqueId = uniqueId;
Hero = hero;
Position = position;
EndTime = endTime;
}
开发者ID:Lizzaran,项目名称:LeagueSharp-Standalones,代码行数:7,代码来源:BuffManagerArgs.cs
示例3: ECast
private static void ECast(Obj_AI_Hero enemy)
{
var range = Orbwalking.GetRealAutoAttackRange(enemy);
var path = Geometry.CircleCircleIntersection(ObjectManager.Player.ServerPosition.To2D(),
Prediction.GetPrediction(enemy, 0.25f).UnitPosition.To2D(), LucianSpells.E.Range, range);
if (path.Count() > 0)
{
var epos = path.MinOrDefault(x => x.Distance(Game.CursorPos));
if (epos.To3D().UnderTurret(true) || epos.To3D().IsWall())
{
return;
}
if (epos.To3D().CountEnemiesInRange(LucianSpells.E.Range - 100) > 0)
{
return;
}
LucianSpells.E.Cast(epos);
}
if (path.Count() == 0)
{
var epos = ObjectManager.Player.ServerPosition.Extend(enemy.ServerPosition, -LucianSpells.E.Range);
if (epos.UnderTurret(true) || epos.IsWall())
{
return;
}
// no intersection or target to close
LucianSpells.E.Cast(ObjectManager.Player.ServerPosition.Extend(enemy.ServerPosition, -LucianSpells.E.Range));
}
}
开发者ID:JelloBeans,项目名称:LeagueSharp,代码行数:32,代码来源:Program.cs
示例4: Check
public static bool Check(Obj_AI_Hero target, DamageType damageType = DamageType.True, bool ignoreShields = true)
{
try
{
if (target.HasBuffOfType(BuffType.Invulnerability) || target.IsInvulnerable)
{
return true;
}
foreach (var invulnerable in Items)
{
if (invulnerable.Champion == null || invulnerable.Champion == target.ChampionName)
{
if (invulnerable.DamageType == null || invulnerable.DamageType == damageType)
{
if (!ignoreShields && invulnerable.IsShield && target.HasBuff(invulnerable.BuffName))
{
return true;
}
if (invulnerable.CustomCheck != null && CustomCheck(invulnerable, target, damageType))
{
return true;
}
}
}
}
return false;
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
return false;
}
开发者ID:juan2202,项目名称:LeagueSharp-Standalones,代码行数:33,代码来源:Invulnerable.cs
示例5: CheckCleanse
internal static void CheckCleanse(Obj_AI_Hero player)
{
foreach (var hero in Activator.Heroes.Where(x => x.Player.NetworkId == player.NetworkId))
{
hero.CleanseBuffCount = GetAuras(hero.Player, "summonerboost").Count();
if (hero.CleanseBuffCount > 0)
{
foreach (var buff in GetAuras(hero.Player, "summonerboost"))
{
var duration = (int) Math.Ceiling(buff.EndTime - buff.StartTime);
if (duration > hero.CleanseHighestBuffTime)
{
hero.CleanseHighestBuffTime = duration;
}
}
hero.LastDebuffTimestamp = Utils.GameTimeTickCount;
}
else
{
if (hero.CleanseHighestBuffTime > 0)
hero.CleanseHighestBuffTime -= hero.QSSHighestBuffTime;
else
hero.CleanseHighestBuffTime = 0;
}
}
}
开发者ID:jayblah,项目名称:KurisuSolutions,代码行数:29,代码来源:Buffs.cs
示例6: GetComboDamage
private float GetComboDamage(Obj_AI_Hero t)
{
float fComboDamage = 0f;
if (Q.IsReady())
fComboDamage += (float)ObjectManager.Player.GetSpellDamage(t, SpellSlot.Q);
//fComboDamage += CalcQDamage;
if (W.Level >0)
fComboDamage += (float)ObjectManager.Player.GetSpellDamage(t, SpellSlot.W);
if (E.IsReady())
fComboDamage += (float) ObjectManager.Player.GetSpellDamage(t, SpellSlot.E);
if (R.IsReady())
fComboDamage += (float) ObjectManager.Player.GetSpellDamage(t, SpellSlot.R);
if (ObjectManager.Player.GetSpellSlot("summonerdot") != SpellSlot.Unknown &&
ObjectManager.Player.Spellbook.CanUseSpell(ObjectManager.Player.GetSpellSlot("summonerdot")) ==
SpellState.Ready && ObjectManager.Player.Distance(t) < 550)
fComboDamage += (float) ObjectManager.Player.GetSummonerSpellDamage(t, Damage.SummonerSpell.Ignite);
if (Items.CanUseItem(3144) && ObjectManager.Player.Distance(t) < 550)
fComboDamage += (float) ObjectManager.Player.GetItemDamage(t, Damage.DamageItems.Bilgewater);
if (Items.CanUseItem(3153) && ObjectManager.Player.Distance(t) < 550)
fComboDamage += (float) ObjectManager.Player.GetItemDamage(t, Damage.DamageItems.Botrk);
return fComboDamage;
}
开发者ID:qktlfflzk,项目名称:Backup5.4,代码行数:30,代码来源:Varus.cs
示例7: GetTarget
public static Obj_AI_Hero GetTarget(float range,
TargetSelector.DamageType damageType,
bool ignoreShield = true,
IEnumerable<Obj_AI_Hero> ignoredChamps = null,
Vector3? rangeCheckFrom = null)
{
if (_lastTarget == null || !_lastTarget.IsValidTarget() || _lastDamageType != damageType)
{
var newTarget = TargetSelector.GetTarget(range, damageType, ignoreShield, ignoredChamps, rangeCheckFrom);
_lastTarget = newTarget;
_lastDamageType = damageType;
return newTarget;
}
if (_lastTarget.IsValidTarget(range) && damageType == _lastDamageType)
{
return _lastTarget;
}
var newTarget2 = TargetSelector.GetTarget(range, damageType, ignoreShield, ignoredChamps, rangeCheckFrom);
_lastTarget = newTarget2;
_lastDamageType = damageType;
return newTarget2;
}
开发者ID:47110572,项目名称:CN,代码行数:28,代码来源:TargetSelector.cs
示例8: Update
public void Update(Obj_AI_Hero target)
{
if (target.HealthPercent >= _minEnemyHealth && (!_onlyTwitchUlt || ObjectManager.Player.HasBuff("TwitchFullAutomatic")))
{
Use(target);
}
}
开发者ID:jayblah,项目名称:TheNinow,代码行数:7,代码来源:YoumusBlade.cs
示例9: Update
public void Update(Obj_AI_Hero target)
{
if ((target.HealthPercent >= _minEnemyHealth || ObjectManager.Player.HealthPercent < 20) && ObjectManager.Player.HealthPercent <= _maxPlayerHealth && target.Distance(ObjectManager.Player) < 550)
{
Use(target);
}
}
开发者ID:jayblah,项目名称:TheNinow,代码行数:7,代码来源:Botrk.cs
示例10: IsPositionSafe
// use underTurret and .Extend for this please
public static bool IsPositionSafe(Obj_AI_Hero target, Spell spell)
{
var predPos = spell.GetPrediction(target).UnitPosition.To2D();
var myPos = Player.Position.To2D();
var newPos = (target.Position.To2D() - myPos);
newPos.Normalize();
var checkPos = predPos + newPos * (spell.Range - Vector2.Distance(predPos, myPos));
Obj_Turret closestTower = null;
foreach (var tower in ObjectManager.Get<Obj_Turret>()
.Where(tower => tower.IsValid && !tower.IsDead && Math.Abs(tower.Health) > float.Epsilon)
.Where(tower => Vector3.Distance(tower.Position, Player.Position) < 1450))
{
closestTower = tower;
}
if (closestTower == null)
return true;
if (Vector2.Distance(closestTower.Position.To2D(), checkPos) <= 910)
return false;
return true;
}
开发者ID:uio25371555,项目名称:LeagueSharp-Development,代码行数:26,代码来源:Quinn.cs
示例11: EnemyWStackCount
public static int EnemyWStackCount(Obj_AI_Hero t)
{
return
t.Buffs.Where(xBuff => xBuff.Name == "varuswdebuff" && t.IsValidTarget(Q.Range))
.Select(xBuff => xBuff.Count)
.FirstOrDefault();
}
开发者ID:qktlfflzk,项目名称:Backup5.4,代码行数:7,代码来源:Varus.cs
示例12: Cast
internal bool Cast(Obj_AI_Hero target, bool farmcast = false)
{
if (!item.IsReady())
{
return false;
}
if (!farmcast)
{
if ((type == ItemCastType.SelfCast || type == ItemCastType.RangeCast) &&
Player.CountEnemiesInRange(item.Range) >= eneinrangecount)
{
item.Cast();
return true;
}
if (type == ItemCastType.TargettedCast && target.IsInRange(item.Range))
{
item.Cast(target);
return true;
}
}
else if (farmcast)
{
if ((type == ItemCastType.SelfCast || type == ItemCastType.RangeCast) && ObjectManager.Get<Obj_AI_Minion>().Count(x=> x.IsValidTarget(item.Range)) >= minioncount)
{
item.Cast();
return true;
}
}
return false;
}
开发者ID:Ryzeros,项目名称:L-,代码行数:34,代码来源:ItemManager.cs
示例13: Combo
public static void Combo(Obj_AI_Hero t)
{
var useQ = Menu.Item("UseQ").GetValue<bool>();
var useR = Menu.Item("UseR").GetValue<bool>();
var alwaysStun = Menu.Item("alwaysStun").GetValue<bool>();
var numOfEnemies = Menu.Item("MinEnemys").GetValue<Slider>().Value;
t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);
if (useQ && Q.IsReady())
{
if (t.IsValidTarget())
{
if (alwaysStun)
{
castStunQ(t);
}
else
{
Q.Cast(t);
}
}
}
if (useR && R.IsReady())
{
var t2 = TargetSelector.GetTarget(2500, TargetSelector.DamageType.Magical);
if (GetEnemys(t2) >= numOfEnemies)
{
R.Cast(t2, false, true);
}
}
}
开发者ID:fgpmaia123,项目名称:LeagueSharp-14,代码行数:32,代码来源:Program.cs
示例14: CalculateComboDamage
public static float CalculateComboDamage(Obj_AI_Hero target, bool ignite, bool smite)
{
try
{
var damage = 0f;
if (ignite && Ignite.Exists() && Ignite.IsReady() &&
target.Position.Distance(ObjectManager.Player.Position) <= Ignite.Range)
{
damage += (float) ObjectManager.Player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
}
if (smite)
{
if (BlueSmite.Exists() && BlueSmite.IsReady() &&
target.Position.Distance(ObjectManager.Player.Position) <= BlueSmite.Range)
{
damage += CalculateBlueSmiteDamage();
}
else if (RedSmite.Exists() && RedSmite.IsReady() &&
target.Position.Distance(ObjectManager.Player.Position) <= RedSmite.Range)
{
damage += CalculateRedSmiteDamage();
}
}
return damage;
}
catch (Exception ex)
{
Global.Logger.AddItem(new LogItem(ex));
}
return 0f;
}
开发者ID:4859aa,项目名称:LeagueSharp-Dev,代码行数:31,代码来源:Summoners.cs
示例15: Set
public static void Set(Obj_AI_Hero t)
{
if (s_Target != t)
s_Flashed = false;
s_Target = t;
}
开发者ID:xQxCPMxQx,项目名称:Leaguesharp-7,代码行数:7,代码来源:Target.cs
示例16: UltTarget
public UltTarget(GameObject obj)
{
Target = obj as Obj_AI_Hero;
CastTime = Environment.TickCount;
EndTime = CastTime + 8000;
Game.OnUpdate += Game_OnUpdate;
}
开发者ID:realcruiser,项目名称:LeagueSharp,代码行数:7,代码来源:Program.cs
示例17: CalculateDamageR
public override double CalculateDamageR(Obj_AI_Hero target)
{
if(!Spells[R].IsReady())
return 0;
return ObjectManager.Player.CalcDamage(target, Damage.DamageType.Magical, new int[] { 250, 375, 500 }[Spells[R].Level - 1] + ObjectManager.Player.FlatMagicDamageMod + target.FlatMagicDamageMod * 0.8);
}
开发者ID:xQxCPMxQx,项目名称:Leaguesharp-7,代码行数:7,代码来源:Veigar.cs
示例18: SummonerItems
public SummonerItems(Obj_AI_Hero myHero)
{
player = myHero;
sumBook = player.Spellbook;
ignite = player.GetSpellSlot("summonerdot");
smite = player.GetSpellSlot("SummonerSmite");
}
开发者ID:Merc491,项目名称:GoodGuyJodu,代码行数:7,代码来源:SummonerItems.cs
示例19: Interrupter2_OnInterruptableTarget
private void Interrupter2_OnInterruptableTarget(Obj_AI_Hero unit, Interrupter2.InterruptableTargetEventArgs args)
{
if (E.IsReady() && Config.Item("EInterruptable").GetValue<bool>() && unit.IsValidTarget(E.Range))
{
E.Cast(unit);
}
}
开发者ID:Deprive,项目名称:Private,代码行数:7,代码来源:Draven.cs
示例20: Combo
private void Combo(Obj_AI_Hero target)
{
if (target == null || !target.IsValid)
{
return;
}
if (Q.IsReady() && Player.Distance(target) < Q.Range)
{
if (W.IsReady())
{
W.Cast();
}
Q.CastOnUnit(target);
}
if (E.IsReady())
{
E.CastOnUnit(target);
}
if (R.IsReady() && Player.Distance(target) < Q.Range)
{
R.Cast(Target.Position);
}
}
开发者ID:alstjr0006,项目名称:Experimental,代码行数:25,代码来源:Irelia.cs
注:本文中的Obj_AI_Hero类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论