当前位置: 首页>>代码示例>>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;未经允许,请勿转载。