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


C# SpellSlot.ToString方法代码示例

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


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

示例1: IsSpellActive

        /// <summary>
        ///     The is the spell active method.
        /// </summary>
        /// <param name="spellSlot">
        ///     The spell slot.
        /// </param>
        /// <param name="orbwalkingMode">
        ///     The orbwalking mode.
        /// </param>
        /// <returns>
        ///     <see cref="bool" />
        /// </returns>
        private static bool IsSpellActive(SpellSlot spellSlot, Orbwalking.OrbwalkingMode orbwalkingMode)
        {
            if (Program.Orbwalker.ActiveMode != orbwalkingMode || !spellSlot.IsReady())
            {
                return false;
            }

            try
            {
                var orbwalkerModeLower = Program.Orbwalker.ActiveMode.ToString().ToLower();
                var spellSlotNameLower = spellSlot.ToString().ToLower();

                return MyMenu.RootMenu.Item(orbwalkerModeLower + spellSlotNameLower + "use").GetValue<bool>()
                       && MyMenu.RootMenu.Item(orbwalkerModeLower + spellSlotNameLower + "mana")
                              .GetValue<Slider>()
                              .Value <= ObjectManager.Player.ManaPercent;
            }
            catch (Exception e)
            {
                Logging.AddEntry(
                    LoggingEntryTrype.Error,
                    "@SpellManager.cs: Can not get spell active state for slot {0} - {1}",
                    spellSlot.ToString(),
                    e);
                throw;
            }
        }
开发者ID:vuathan2,项目名称:LeagueSharp,代码行数:39,代码来源:SpellManager.cs

示例2: AddSkill

        public static MenuItem AddSkill(this Menu mainMenu, SpellSlot slot, Orbwalking.OrbwalkingMode Mode, bool defaultValue = true, int defMana = 20, bool addMM = true)
        {
            if (addMM)
            {
                mainMenu.AddManaManager(slot, Mode, defMana);
            }

            return mainMenu.AddBool($"iseriesr.{ObjectManager.Player.ChampionName.ToLower()}.{Mode.ToString().ToLower()}.{slot.ToString().ToLower()}", $"Use {slot}", defaultValue);
        }
开发者ID:luizssn,项目名称:LeagueSharp,代码行数:9,代码来源:iSRMenuExtensions.cs

示例3: AddManaManager

        public static MenuItem AddManaManager(this Menu mainMenu, SpellSlot slot, Orbwalking.OrbwalkingMode Mode, int defMana = 0)
        {
            var mmMenu =
                mainMenu.Children.FirstOrDefault(
                    m =>
                        m.Name.ToLower().Contains(
                        $"iseriesr.{ObjectManager.Player.ChampionName.ToLower()}.{Mode.ToString().ToLower()}.mm"));

            if (mmMenu == null)
            {
                mmMenu = mainMenu.AddManaManagerMenu(Mode);
            }

            return mmMenu.AddSlider(
                $"iseriesr.{ObjectManager.Player.ChampionName.ToLower()}.{Mode.ToString().ToLower()}.mm.{slot.ToString().ToLower()}",
                $"{slot} Mana {Mode}", defMana, 0, 100);
        }
开发者ID:luizssn,项目名称:LeagueSharp,代码行数:17,代码来源:iSRMenuExtensions.cs

示例4: GenerateSpellMenu

        /// <summary>
        ///     The generate spell menu method.
        /// </summary>
        /// <param name="spellSlot">
        ///     The spell slot.
        /// </param>
        internal static void GenerateSpellMenu(SpellSlot spellSlot)
        {
            try
            {
                var spellSlotName = spellSlot.ToString();
                var spellSlotNameLower = spellSlotName.ToLower();

                var node = new Menu(spellSlot + " Settings", "spellmenu" + spellSlotNameLower);

                var nodeCombo = new Menu("Combo", spellSlotNameLower + "combomenu");
                nodeCombo.AddItem(
                    new MenuItem("combo" + spellSlotNameLower + "use", "Use " + spellSlotName).SetValue(true));
                nodeCombo.AddItem(
                    new MenuItem("combo" + spellSlotNameLower + "mana", "Min. Mana").SetValue(new Slider(5)));
                node.AddSubMenu(nodeCombo);

                var nodeMixed = new Menu("Mixed", spellSlotNameLower + "mixedmenu");
                nodeMixed.AddItem(
                    new MenuItem("mixed" + spellSlotNameLower + "use", "Use " + spellSlotName).SetValue(true));
                nodeMixed.AddItem(
                    new MenuItem("mixed" + spellSlotNameLower + "mana", "Min. Mana").SetValue(new Slider(50)));
                node.AddSubMenu(nodeMixed);

                var nodeLastHit = new Menu("LastHit", spellSlotNameLower + "lasthitmenu");
                nodeLastHit.AddItem(
                    new MenuItem("lasthit" + spellSlotNameLower + "use", "Use " + spellSlotName).SetValue(true));
                nodeLastHit.AddItem(
                    new MenuItem("lasthit" + spellSlotNameLower + "mana", "Min. Mana").SetValue(new Slider(50)));
                node.AddSubMenu(nodeLastHit);

                var nodeLaneClear = new Menu("LaneClear", spellSlotNameLower + "laneclearmenu");
                nodeLaneClear.AddItem(
                    new MenuItem("laneclear" + spellSlotNameLower + "use", "Use " + spellSlotName).SetValue(true));
                nodeLaneClear.AddItem(
                    new MenuItem("laneclear" + spellSlotNameLower + "mana", "Min. Mana").SetValue(new Slider(50)));
                node.AddSubMenu(nodeLaneClear);

                RootMenu.AddSubMenu(node);
            }
            catch (Exception e)
            {
                Logging.AddEntry(LoggingEntryTrype.Error, "@MyMenu.cs: Can not generate menu for spell - {0}", e);
                throw;
            }
        }
开发者ID:vuathan2,项目名称:LeagueSharp,代码行数:51,代码来源:MyMenu.cs

示例5: AddSpell

        public static Menu AddSpell(this Menu menu, SpellSlot spell, List<Orbwalking.OrbwalkingMode> modes)
        {
            var spellMenu = menu.AddMenu(spell.ToString(), spell.ToString());
            foreach (var mode in modes)
            {
                spellMenu.AddBool(mode.GetModeString() + spell, "Use in " + mode.GetModeString());
            }

            return spellMenu;
        }
开发者ID:StopMotionCuber,项目名称:LeagueSharp-1,代码行数:10,代码来源:MenuExtensions.cs

示例6: HitChancePercent

 private static float HitChancePercent(SpellSlot s)
 {
     var slot = s.ToString().Trim();
     return IsHarass
         ? SubMenu["Prediction"][slot + "Harass"].Cast<Slider>().CurrentValue
         : SubMenu["Prediction"][slot + "Combo"].Cast<Slider>().CurrentValue;
 }
开发者ID:tramyeu,项目名称:EloBuddy,代码行数:7,代码来源:Program.cs

示例7: GetStringFromSpellSlot

 public static String GetStringFromSpellSlot(SpellSlot sp)
 {
     return sp.ToString();
 }
开发者ID:DZ191,项目名称:LeagueSharp,代码行数:4,代码来源:ModesMenuExtensions.cs

示例8: DrawDamageOnHealthbar

 private static void DrawDamageOnHealthbar(Obj_AI_Hero healthbar, double damage, ref double playerHealthPercent, double prevPlayerHealthPercent, ref bool shouldDrawLine, Color spellColor, bool drawtext = false, SpellSlot slot = SpellSlot.Unknown)
 {
     DrawDamageOnHealthbar(healthbar, damage, ref playerHealthPercent, prevPlayerHealthPercent, ref shouldDrawLine, spellColor, slot.ToString(), drawtext, slot);
 }
开发者ID:jayblah,项目名称:TheNinow,代码行数:4,代码来源:TheDamage.cs

示例9: DrawSpell

        private void DrawSpell(AIHeroClient hero, SpellSlot slot)
        {
            var spell = hero.Spellbook.GetSpell(slot);
            var color = Color.Cyan;
            var cooldown = spell.CooldownExpires - Game.Time;
            var location = this.GetSpellLocation(hero, slot);

            var str = slot.ToString();

            if (!spell.IsLearned)
            {
                str = "?";
                color = Color.White;
            }
            else if (hero.Mana < spell.SData.Mana)
            {
                str = "M";
                color = Color.Red;
            }
            else if (cooldown > 0)
            {
                str = ((int)Math.Ceiling(cooldown)).ToString();
                color = Color.Orange;
            }

            this.text.Draw(string.Format("{0,3}", str), color, (int)location.X, (int)location.Y);
        }
开发者ID:strcow,项目名称:CowBuddy,代码行数:27,代码来源:Cooldown.cs


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