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


C# Ability.FindCastPoint方法代码示例

本文整理汇总了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;
 }
开发者ID:IdcNoob,项目名称:Ensage,代码行数:7,代码来源:Torrent.cs

示例2: TimberAbility

 protected TimberAbility(Ability ability)
 {
     Ability = ability;
     CastPoint = (float)ability.FindCastPoint();
     Name = ability.Name;
     Sleeper = new Sleeper();
 }
开发者ID:IdcNoob,项目名称:Ensage,代码行数:7,代码来源:TimberAbility.cs

示例3: GhostShip

 public GhostShip(Ability ability)
 {
     Ability = ability;
     CastPoint = (float)ability.FindCastPoint();
     Radius = 560;
     Speed = ability.GetProjectileSpeed();
     AghanimSpeed = Speed * 4;
 }
开发者ID:IdcNoob,项目名称:Ensage,代码行数:8,代码来源:GhostShip.cs

示例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();

//.........这里部分代码省略.........
开发者ID:LimbViolencer,项目名称:Ensage-1,代码行数:101,代码来源:Program.cs

示例5: Xmark

 public Xmark(Ability ability)
 {
     Ability = ability;
     CastPoint = (float)ability.FindCastPoint();
 }
开发者ID:IdcNoob,项目名称:Ensage,代码行数:5,代码来源:Xmark.cs

示例6: Xreturn

 public Xreturn(Ability ability)
 {
     Ability = ability;
     CastPoint = (float)ability.FindCastPoint();
 }
开发者ID:IdcNoob,项目名称:Ensage,代码行数:5,代码来源:Xreturn.cs


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