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


C# Ability.GetProjectileSpeed方法代码示例

本文整理汇总了C#中Ability.GetProjectileSpeed方法的典型用法代码示例。如果您正苦于以下问题:C# Ability.GetProjectileSpeed方法的具体用法?C# Ability.GetProjectileSpeed怎么用?C# Ability.GetProjectileSpeed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Ability的用法示例。


在下文中一共展示了Ability.GetProjectileSpeed方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Ravage

        public Ravage(Ability ability)
            : base(ability)
        {
            Modifier = new EvadableModifier(HeroTeam, EvadableModifier.GetHeroType.LowestHealth);

            projectileSpeed = ability.GetProjectileSpeed() + 100;
            tavelTime = GetRadius() / projectileSpeed;
            width = 350;

            CounterAbilities.Add(PhaseShift);
            CounterAbilities.Add(BallLightning);
            CounterAbilities.Add(Eul);
            CounterAbilities.AddRange(StrongDefUltimates);
            CounterAbilities.AddRange(VsDisable);
            CounterAbilities.AddRange(VsDamage);
            CounterAbilities.AddRange(VsMagic);
            CounterAbilities.AddRange(Invis);
            CounterAbilities.Add(SnowBall);
            CounterAbilities.Add(Armlet);
            CounterAbilities.Add(Bloodstone);
            CounterAbilities.Remove("abaddon_aphotic_shield");

            Modifier.AllyCounterAbilities.AddRange(AllyShields);
            Modifier.AllyCounterAbilities.AddRange(Invul);
            Modifier.AllyCounterAbilities.AddRange(VsMagic);
        }
开发者ID:IdcNoob,项目名称:Ensage,代码行数:26,代码来源:Ravage.cs

示例2: 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

示例3: 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

示例4: RocketFlare

        public RocketFlare(Ability ability)
            : base(ability)
        {
            DisablePathfinder = true;

            CounterAbilities.Add(PhaseShift);
            CounterAbilities.Add(BallLightning);
            CounterAbilities.Add(SleightOfFist);
            CounterAbilities.AddRange(VsDamage);
            CounterAbilities.AddRange(VsMagic);
            CounterAbilities.Add(Armlet);
            CounterAbilities.Add(Bloodstone);

            projectileSpeed = ability.GetProjectileSpeed();
        }
开发者ID:IdcNoob,项目名称:Ensage,代码行数:15,代码来源:RocketFlare.cs

示例5: PoisonNova

        public PoisonNova(Ability ability)
            : base(ability)
        {
            Modifier = new EvadableModifier(HeroTeam, EvadableModifier.GetHeroType.LowestHealth);

            Modifier.AllyCounterAbilities.AddRange(AllyShields);
            Modifier.AllyCounterAbilities.AddRange(VsMagic);

            BlinkAbilities.AddRange(BlinkAbilityNames);

            CounterAbilities.Add(PhaseShift);
            CounterAbilities.Add(BallLightning);
            CounterAbilities.Add(Eul);
            CounterAbilities.AddRange(VsDamage);
            CounterAbilities.AddRange(VsMagic);
            CounterAbilities.Add(SnowBall);

            speed = ability.GetProjectileSpeed();
            tavelTime = GetRadius() / speed;
            projectileSize = Ability.AbilitySpecialData.First(x => x.Name == "start_radius").Value + 60;
        }
开发者ID:IdcNoob,项目名称:Ensage,代码行数:21,代码来源:PoisonNova.cs

示例6: 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

示例7: LetsTryCastSpell

        private static void LetsTryCastSpell(Hero me, Hero target, Ability spellForCast, bool nextSpell=false)
        {
            var ss = me.FindSpell("invoker_sun_strike");
            var icewall = me.FindSpell("invoker_ice_wall");
            var blast = me.FindSpell("invoker_deafening_blast");
            var tornado = me.FindSpell("invoker_tornado");
            var emp = me.FindSpell("invoker_emp");
            /*
            var coldsnap = me.FindSpell("invoker_cold_snap");
            var ghostwalk = me.FindSpell("invoker_ghost_walk");
            
            var forge = me.FindSpell("invoker_forge_spirit");
            var emp = me.FindSpell("invoker_emp");
            var alacrity = me.FindSpell("invoker_alacrity");
            */
            var meteor = me.FindSpell("invoker_chaos_meteor");
            var eulmodif = target.Modifiers.FirstOrDefault(x => x.Name == "modifier_eul_cyclone" || x.Name == "modifier_invoker_tornado");
            /*foreach (var source in target.Modifiers.ToList())
            {
                PrintInfo(source.Name+": "+source.RemainingTime);
            }*/
            var timing = Equals(spellForCast, ss)
                ? 1.7
                : Equals(spellForCast, meteor)
                    ? 1.3
                    : Equals(spellForCast, blast)
                        ? me.Distance2D(target)/1100 + Game.Ping/1000
                        : (Equals(spellForCast, icewall))
                            ? 2.5
                            : Equals(spellForCast, emp) ? 2.9 : 0;

            if (eulmodif!=null && eulmodif.RemainingTime<=timing)
            {
                if (icewall != null && Equals(spellForCast, icewall))
                {
                    CastIceWall(me, target, me.Distance2D(target) <= 250,icewall);
                }
                else
                {
                    UseSpell(spellForCast, target,me);
                    //Game.PrintMessage(spellForCast.Name+" (2)", MessageType.ChatMessage);
                    //PrintInfo("caster "+spellForCast.Name+" with timing "+timing);
                    Utils.Sleep(250, "StageCheck");
                    _stage++;
                }
            }
            else if (eulmodif == null /*&& !Equals(spellForCast, ss)*/)
            {
                if (icewall != null && Equals(spellForCast, icewall))
                {
                    CastIceWall(me, target, me.Distance2D(target) <= 300, icewall);
                }
                else
                {
                    var time = 250f;
                    if (Equals(spellForCast, tornado))
                    {
                        if (nextSpell) time += me.Distance2D(target)/spellForCast.GetProjectileSpeed()*1000 + Game.Ping;

                        spellForCast.CastSkillShot(target, me.Position,spellForCast.Name);
                        //Game.PrintMessage("CastSkillShot "+spellForCast.CastSkillShot(target, me.Position,spellForCast.Name),MessageType.ChatMessage);
                    }
                    else
                    {
                        //Game.PrintMessage("suka: " + spellForCast.Name,MessageType.ChatMessage);
                        UseSpell(spellForCast, target,me);
                    }
                    Utils.Sleep(time, "StageCheck");
                    _stage++;
                }
            }
        }
开发者ID:dendimonster,项目名称:EnsageSharp-1,代码行数:72,代码来源:Program.cs


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