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


C# Ability类代码示例

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


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

示例1: IcePath

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

            CounterAbilities.Add(PhaseShift);
            CounterAbilities.Add(BallLightning);
            CounterAbilities.Add(Eul);
            CounterAbilities.AddRange(VsDisable);
            CounterAbilities.Add(SnowBall);
            CounterAbilities.Add(Armlet);
            CounterAbilities.Add(Bloodstone);
            CounterAbilities.Remove("bane_nightmare");
            CounterAbilities.Remove("abaddon_aphotic_shield");

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

            AdditionalDelay = ability.AbilitySpecialData.First(x => x.Name == "path_delay").Value;

            for (var i = 0u; i < duration.Length; i++)
            {
                duration[i] = ability.AbilitySpecialData.First(x => x.Name == "duration").GetValue(i);
            }

            talent = AbilityOwner.FindSpell("special_bonus_unique_jakiro");

            if (talent != null)
            {
                bonusDuration = talent.AbilitySpecialData.First(x => x.Name == "value").Value;
            }

            ObstacleStays = true;
        }
开发者ID:IdcNoob,项目名称:Ensage,代码行数:35,代码来源:IcePath.cs

示例2: Tower

 public Tower(Texture2D texture, Vector2 position, int range, Ability attack)
     : base(texture, position)
 {
     Range = range;
     TowerAbility = attack;
     CanAttack = true;
 }
开发者ID:Grahamcraker,项目名称:Project_Greenhorn,代码行数:7,代码来源:Tower.cs

示例3: AddActive

 public void AddActive(Ability ab, int slot)
 {
     if(!allAbilities.Contains(ab))
         allAbilities.Add(ab);
     if(slot >= 0)
         SetActive(allAbilities.IndexOf(ab),slot);
 }
开发者ID:EternalGB,项目名称:platforming-combat-roguelike,代码行数:7,代码来源:AbilitiesController.cs

示例4: Mjollnir

        public Mjollnir(Ability ability)
            : base(ability)
        {
            Modifier = new EvadableModifier(EnemyTeam, EvadableModifier.GetHeroType.ModifierSource);

            Modifier.EnemyCounterAbilities.Add(FortunesEnd);
        }
开发者ID:IdcNoob,项目名称:Ensage,代码行数:7,代码来源:Mjollnir.cs

示例5: DamageAmpValue

 public static float DamageAmpValue(Ability ability)
 {
     var multi = !MultiplierDictionary.ContainsKey(ability.Name)
                     ? 0
                     : Math.Abs(MultiplierDictionary[ability.Name]);
     return multi;
 }
开发者ID:dendimonster,项目名称:EnsageSharp,代码行数:7,代码来源:DamageAmps.cs

示例6: Projectile

 protected Projectile(Ability ability)
     : base(ability)
 {
     IsDisjointable = true;
     radius = 75;
     DisablePathfinder = true;
 }
开发者ID:IdcNoob,项目名称:Ensage,代码行数:7,代码来源:Projectile.cs

示例7: Torrent

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

            CounterAbilities.Add(PhaseShift);
            CounterAbilities.Add(BallLightning);
            CounterAbilities.Add(SleightOfFist);
            CounterAbilities.Add(Manta);
            CounterAbilities.Add(Eul);
            CounterAbilities.AddRange(VsDisable);
            CounterAbilities.AddRange(VsDamage);
            CounterAbilities.AddRange(VsMagic);
            CounterAbilities.AddRange(Invis);
            CounterAbilities.Add(SnowBall);
            CounterAbilities.Add(Armlet);
            CounterAbilities.Add(Bloodstone);

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

            AdditionalDelay = Ability.AbilitySpecialData.First(x => x.Name == "delay").Value;

            talent = AbilityOwner.FindSpell("special_bonus_unique_kunkka");

            if (talent != null)
            {
                bonusRadius = talent.AbilitySpecialData.First(x => x.Name == "value").Value;
            }
        }
开发者ID:IdcNoob,项目名称:Ensage,代码行数:31,代码来源:Torrent.cs

示例8: Check

 public static bool Check(Ability ability)
 {
     return MyAbilities.SoulRing.CanBeCasted() && ability.ManaCost > 0 && Utils.SleepCheck("Ability.SoulRing")
            && Heals.HealsMenuDictionary["item_soul_ring"].Item("item_soul_ringuseBeforeCast").GetValue<bool>()
            && Heals.HealsMenuDictionary["item_soul_ring"].Item("item_soul_ringminHp").GetValue<Slider>().Value
            < AbilityMain.Me.Health;
 }
开发者ID:dendimonster,项目名称:EnsageSharp,代码行数:7,代码来源:SoulRing.cs

示例9: Create

        public static Menu Create(string name, Ability ability)
        {
            var menu = new Menu(name, name, textureName: name);
            if (name == "rubick_spell_steal")
            {
                return menu;
            }

            menu.AddItem(Togglers.OnSight(name));
            var data = AbilityDatabase.Find(name);
            var defaultValue = ability.AbilityType != AbilityType.Ultimate;
            if (data != null)
            {
                if (data.TrueSight)
                {
                    menu.AddItem(Togglers.OnInvisible(name, defaultValue));
                }

                if (data.IsPurge)
                {
                    menu.AddItem(Togglers.OnPurgable(name, defaultValue));
                }

                if (data.WeakensEnemy)
                {
                    menu.AddItem(Togglers.OnAttack(name, defaultValue));
                }
            }

            menu.AddItem(Sliders.MinManaCheck(name));
            menu.AddItem(Sliders.MinManaCheck(name, true));
            return menu;
        }
开发者ID:Ray0fHope,项目名称:EnsageSharp,代码行数:33,代码来源:SpecialMenu.cs

示例10: AbilityDisplay

        public AbilityDisplay(Ability ability, int exp)
        {
            _ability = ability;
            _exp = exp;

            InitializeComponent();
        }
开发者ID:HaKDMoDz,项目名称:armadillo,代码行数:7,代码来源:AbilityDisplay.cs

示例11: add

 public void add(Ability ability)
 {
     if ( !_abilities.Contains( ability ) )
         _abilities.Add( ability );
     //ability.initData( caster , this );
     Debug.Log( "Added " + ability.name + " to " + caster.name + "'s abilitycontainer" );
 }
开发者ID:Kingsquee,项目名称:Warengine,代码行数:7,代码来源:AbilityContainer.cs

示例12: Execute

        /// <summary>
        /// Execute dirtytricks ability
        /// </summary>
        /// <param name="ab">The used ability</param>
        /// <param name="player">The player that used the ability</param>
        public void Execute(Ability ab, GamePlayer player)
        {
            if (player == null)
            {
                if (log.IsWarnEnabled)
                    log.Warn("Could not retrieve player in DirtyTricksAbilityHandler.");
                return;
            }

            if (!player.IsAlive)
            {
                player.Out.SendMessage("You are dead and can't use that ability!", eChatType.CT_YouHit, eChatLoc.CL_SystemWindow);
                return;
            }

            if (player.IsMezzed)
            {
                player.Out.SendMessage("You cannot use this while Mezzed!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
                return;
            }
            if (player.IsStunned)
            {
                player.Out.SendMessage("You cannot use this while Stunned!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
                return;
            }
            if (player.IsSitting)
            {
                player.Out.SendMessage("You must be standing to use this ability!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
                return;
            }

            player.DisableSkill(ab, REUSE_TIMER);
            DirtyTricksEffect dt = new DirtyTricksEffect(DURATION * 1000);
            dt.Start(player);
        }
开发者ID:uvbs,项目名称:Dawn-of-Light-core,代码行数:40,代码来源:DirtyTricksAbilityHandler.cs

示例13: AbilityValueSetsModifier

        public void AbilityValueSetsModifier(int value, int modifier)
        {
            var a = new Ability("TestAbility-BaDumBum");
            a.Value = value;

            Assert.AreEqual(modifier, a.Modifier);
        }
开发者ID:JeffroeBodine,项目名称:PuttingTheDnDInTDD,代码行数:7,代码来源:CharacterTests.cs

示例14: Execute

		public void Execute(Ability ab, GamePlayer player)
		{

			RapidFireEffect rapidFire = player.EffectList.GetOfType<RapidFireEffect>();
			if (rapidFire!=null)
			{
				rapidFire.Cancel(false);
				return;
			}

			if(!player.IsAlive)
			{
				player.Out.SendMessage("You can't switch to rapid fire when dead!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
				return;
			}

			SureShotEffect sureShot = player.EffectList.GetOfType<SureShotEffect>();
			if (sureShot != null)
				sureShot.Cancel(false);

			TrueshotEffect trueshot = player.EffectList.GetOfType<TrueshotEffect>();
			if (trueshot != null)
				trueshot.Cancel(false);

			new RapidFireEffect().Start(player);
		}
开发者ID:boscorillium,项目名称:dol,代码行数:26,代码来源:RapidFireAbilityHandler.cs

示例15: Execute

        public void Execute(Ability ab, GamePlayer player)
        {
            SureShotEffect sureShot = player.EffectList.GetOfType<SureShotEffect>();
            if (sureShot != null)
            {
                sureShot.Cancel(false);
                return;
            }

            if (!player.IsAlive)
            {
                player.Out.SendMessage(LanguageMgr.GetTranslation(player.Client.Account.Language, "Skill.Ability.SureShot.CannotUseDead"), eChatType.CT_System, eChatLoc.CL_SystemWindow);
                return;
            }

            RapidFireEffect rapidFire = player.EffectList.GetOfType<RapidFireEffect>();
            if (rapidFire != null)
                rapidFire.Cancel(false);

            TrueshotEffect trueshot = player.EffectList.GetOfType<TrueshotEffect>();
            if (trueshot != null)
                trueshot.Cancel(false);

            new SureShotEffect().Start(player);
        }
开发者ID:mynew4,项目名称:DOLSharp,代码行数:25,代码来源:SureShotAbilityHandler.cs


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