當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。