本文整理汇总了C#中Ability.FindCastPoint方法的典型用法代码示例。如果您正苦于以下问题:C# Ability.FindCastPoint方法的具体用法?C# Ability.FindCastPoint怎么用?C# Ability.FindCastPoint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ability
的用法示例。
在下文中一共展示了Ability.FindCastPoint方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Torrent
public Torrent(Ability ability)
{
Ability = ability;
CastPoint = (float)ability.FindCastPoint();
AdditionalDelay = AbilityDatabase.Find(ability.Name).AdditionalDelay;
Radius = ability.GetRadius() + 25;
}
示例2: TimberAbility
protected TimberAbility(Ability ability)
{
Ability = ability;
CastPoint = (float)ability.FindCastPoint();
Name = ability.Name;
Sleeper = new Sleeper();
}
示例3: GhostShip
public GhostShip(Ability ability)
{
Ability = ability;
CastPoint = (float)ability.FindCastPoint();
Radius = 560;
Speed = ability.GetProjectileSpeed();
AghanimSpeed = Speed * 4;
}
示例4: Game_OnUpdate
private static void Game_OnUpdate(EventArgs args) {
if (!Utils.SleepCheck("CounterDelay"))
return;
if (!inGame) {
hero = ObjectMgr.LocalHero;
if (!Game.IsInGame || hero == null) {
Utils.Sleep(1000, "CounterDelay");
return;
}
inGame = true;
}
if (!Game.IsInGame) {
inGame = false;
return;
}
if (!hero.IsAlive || Game.IsPaused || !Menu.Item("key").GetValue<KeyBind>().Active) {
Utils.Sleep(500, "CounterDelay");
return;
}
if (cameraCentered) {
cameraCentered = false;
Game.ExecuteCommand("-dota_camera_center_on_hero");
}
if (!hero.CanUseItems() || hero.IsChanneling() || hero.IsInvul() || (hero.IsInvisible() && !hero.IsVisibleToEnemies))
return;
var enemies =
ObjectMgr.GetEntities<Hero>()
.Where(x => x.IsVisible && x.IsAlive && !x.IsIllusion && x.Team == hero.GetEnemyTeam()).ToList();
foreach (var enemy in enemies) {
distance = hero.Distance2D(enemy);
angle = Math.Abs(enemy.FindAngleR() - Utils.DegreeToRadian(enemy.FindAngleForTurnTime(hero.NetworkPosition)));
if (enemy.NetworkActivity == NetworkActivity.Crit && distance <= 200 && angle <= 0.03) {
if (UseOnSelf(
Shift.Concat(
DefVsPhys.Concat(
DefVsDamage)))) return;
}
switch (enemy.ClassID) {
case ClassID.CDOTA_Unit_Hero_ArcWarden: {
spell = enemy.Spellbook.SpellQ;
if (spell.IsInAbilityPhase) {
spellCastRange = spell.GetCastRange() + 50;
castPoint = spell.FindCastPoint();
if (distance > spellCastRange || angle > 0.03)
continue;
if (UseOnSelf(
Shift.Concat(
Lotus))) return;
}
break;
}
case ClassID.CDOTA_Unit_Hero_Alchemist: {
spell = enemy.FindSpell("alchemist_unstable_concoction_throw");
if (spell.IsInAbilityPhase) {
spellCastRange = spell.GetCastRange() + 50;
if (distance > spellCastRange || angle > 0.03)
continue;
if (Blink()) return;
if (UseOnSelf(
Shift.Concat(
Eul.Concat(
DefVsDisable.Concat(
DefVsDamage.Concat(
DefVsPhys.Concat(
Lotus.Concat(
Invis)))))))) return;
if (UseOnTarget(
InstaDisable.Concat(
SnowBall.Concat(
OffVsPhys)), enemy)) return;
}
break;
}
case ClassID.CDOTA_Unit_Hero_AntiMage: {
spell = enemy.Spellbook.SpellW;
if (spell.IsInAbilityPhase) {
castPoint = spell.FindCastPoint();
//.........这里部分代码省略.........
示例5: Xmark
public Xmark(Ability ability)
{
Ability = ability;
CastPoint = (float)ability.FindCastPoint();
}
示例6: Xreturn
public Xreturn(Ability ability)
{
Ability = ability;
CastPoint = (float)ability.FindCastPoint();
}