當前位置: 首頁>>代碼示例>>C#>>正文


C# Ability.GetRadius方法代碼示例

本文整理匯總了C#中Ability.GetRadius方法的典型用法代碼示例。如果您正苦於以下問題:C# Ability.GetRadius方法的具體用法?C# Ability.GetRadius怎麽用?C# Ability.GetRadius使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Ability的用法示例。


在下文中一共展示了Ability.GetRadius方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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: Chakram

 public Chakram(Ability chakramAbility, Ability returnAbility)
     : base(chakramAbility)
 {
     Speed = chakramAbility.GetProjectileSpeed();
     Radius = chakramAbility.GetRadius();
     this.returnAbility = returnAbility;
     returnSleeper = new Sleeper();
 }
開發者ID:IdcNoob,項目名稱:Ensage,代碼行數:8,代碼來源:Chakram.cs

示例3: WarStomp

        public WarStomp(Ability ability)
            : base(ability)
        {
            DisableAbilities.Clear();

            CounterAbilities.Add(PhaseShift);
            CounterAbilities.Add(BallLightning);
            CounterAbilities.Add(SleightOfFist);
            CounterAbilities.AddRange(VsLowDisable);

            radius = ability.GetRadius() + 100;
        }
開發者ID:IdcNoob,項目名稱:Ensage,代碼行數:12,代碼來源:WarStomp.cs

示例4: LinearProjectile

        protected LinearProjectile(Ability ability)
            : base(ability)
        {
            speed = ability.GetProjectileSpeed();

            var widthString = AbilityDatabase.Find(Name).Width;
            var endWidthString = AbilityDatabase.Find(Name).EndWidth;

            if (string.IsNullOrEmpty(widthString))
            {
                var radius = ability.GetRadius();

                if ((int)ability.GetCastRange() != (int)radius)
                {
                    startRadius = endRadius = radius + 60;
                }
                else
                {
                    startRadius = endRadius = 250;
                }
            }
            else
            {
                startRadius = ability.AbilitySpecialData.First(x => x.Name == widthString).Value + 60;
                endRadius = ability.AbilitySpecialData.FirstOrDefault(x => x.Name == endWidthString)?.Value + 60
                            ?? startRadius;
            }

            if (startRadius > endRadius)
            {
                endRadius = startRadius;
            }

            Debugger.WriteLine("// Speed: " + speed);
            Debugger.WriteLine("// StartRadius: " + startRadius);
            Debugger.WriteLine("// EndRadius: " + endRadius);
        }
開發者ID:IdcNoob,項目名稱:Ensage,代碼行數:37,代碼來源:LinearProjectile.cs

示例5: Game_OnUpdate


//.........這裏部分代碼省略.........
                                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();

                            if (UseOnTarget(InstaDisable, enemy, castPoint)) return;
                        }

                        spell = enemy.Spellbook.SpellR;

                        if (spell.IsInAbilityPhase) {
                            spellCastRange = spell.GetCastRange() + spell.GetRadius();
                            castPoint = spell.FindCastPoint();

                            if (distance > spellCastRange || angle > 0.8)
                                continue;

                            if (UseOnSelf(
                                Shift.Concat(
                                DefVsDamage.Concat(
                                DefVsMagic.Concat(
                                Lotus))))) return;

                            if (UseOnTarget(InstaDisable, enemy, castPoint)) return;
                        }

                        break;
                    }
                    case ClassID.CDOTA_Unit_Hero_Axe: {
                        spell = enemy.Spellbook.SpellQ;

                        if (spell.IsInAbilityPhase) {
                            spellCastRange = spell.GetCastRange() + 50;
                            castPoint = spell.FindCastPoint();

                            if (distance > spellCastRange)
                                continue;

                            if (Blink(castPoint)) return;

                            if (UseOnSelf(
                                Shift.Concat(
                                Eul.Concat(
                                DefVsDisable.Concat(
開發者ID:LimbViolencer,項目名稱:Ensage-1,代碼行數:67,代碼來源:Program.cs

示例6: WhirlingDeath

 public WhirlingDeath(Ability ability)
     : base(ability)
 {
     Radius = ability.GetRadius();
     comboSleeper = new Sleeper();
 }
開發者ID:IdcNoob,項目名稱:Ensage,代碼行數:6,代碼來源:WhirlingDeath.cs

示例7: AOE

 protected AOE(Ability ability)
     : base(ability)
 {
     radius = ability.GetRadius() + 60;
     Debugger.WriteLine("// Radius: " + radius);
 }
開發者ID:IdcNoob,項目名稱:Ensage,代碼行數:6,代碼來源:AOE.cs


注:本文中的Ability.GetRadius方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。