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


C# Menu.AddTargetSelector方法代码示例

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


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

示例1: Game_OnGameLoad

        private static void Game_OnGameLoad(EventArgs args)
        {
            if (Player.ChampionName != "Fiora")
            {
                return;
            }

            Q = new Spell(SpellSlot.Q, 400 + 175);
            Q.SetSkillshot(.25f, 0, 500, false, SkillshotType.SkillshotLine);

            W = new Spell(SpellSlot.W, 750);
            W.SetSkillshot(0.5f, 95, 3000, false, SkillshotType.SkillshotLine);

            E = new Spell(SpellSlot.E);

            R = new Spell(SpellSlot.R, 500);
            R.SetTargetted(.066f, 500);

            Menu = new Menu("jesuisFiora", "jesuisFiora", true);
            Menu.SetFontStyle(FontStyle.Regular, LorahColor);
            Orbwalker = Menu.AddOrbwalker();

            Menu.AddTargetSelector();

            var spells = Menu.AddMenu("Spells", "Spells");

            var qMenu = spells.AddMenu("Q", "Q");
            qMenu.AddBool("QCombo", "Use in Combo");
            qMenu.AddBool("QHarass", "Use in Harass");
            qMenu.AddInfo("QFleeInfo", "Flee:", LorahColor);
            qMenu.AddKeyBind("QFlee", "Q Flee", 'T');
            qMenu.AddInfo("FleeInfo", " --> Flees towards cursor position.", LorahColor);
            qMenu.AddBool("QKillsteal", "Use for Killsteal");

            var wMenu = spells.AddMenu("W", "W");
            var wSpells = wMenu.AddMenu("BlockSpells", "Blocked Spells");
            wMenu.AddBool("WSpells", "W Incoming Spells");
            wMenu.AddBool("WKillsteal", "Use for Killsteal");
            wMenu.AddBool("WTurret", "Block W Under Enemy Turret");

            SpellBlock.Initialize(wSpells);

            var eMenu = spells.AddMenu("E", "E");
            eMenu.AddBool("ECombo", "Use in Combo");
            eMenu.AddBool("EHarass", "Use in Harass");

            var rMenu = spells.AddMenu("R", "R");
            rMenu.AddBool("RCombo", "Use R");
            rMenu.AddList("RMode", "Cast Mode", new[] { "Duelist", "Combo" });
            rMenu.AddKeyBind("RToggle", "Toggle Mode", 'L');

            rMenu.Item("RToggle").ValueChanged += (sender, eventArgs) =>
            {
                if (!eventArgs.GetNewValue<KeyBind>().Active)
                {
                    return;
                }
                var mode = Menu.Item("RMode");
                var index = mode.GetValue<StringList>().SelectedIndex == 0 ? 1 : 0;
                mode.SetValue(new StringList(new[] { "Duelist", "Combo" }, index));
            };

            rMenu.AddInfo("RModeInfo", " --> Duelist Mode: Only use R when target is killable.", LorahColor);
            rMenu.AddInfo("RModeInfo2", " --> Combo Mode: Use R in normal combo", LorahColor);
            rMenu.AddSlider("RKillVital", "Duelist Mode Min Vitals", 1, 0, 4);
            rMenu.AddInfo("RVitalInfo", " --> Note: This is only for damage calculation in Duelist Mode.", LorahColor);
            rMenu.AddBool("RComboSelected", "Use R Selected on Selected Unit Only");

            var items = spells.AddMenu("Items", "Items");
            items.AddBool("ItemsCombo", "Use in Combo");
            items.AddBool("ItemsHarass", "Use in Harass");

            spells.AddSlider("ManaHarass", "Harass Min Mana Percent", 40);

            var farm = Menu.AddMenu("Farm", "Farm");

            var qFarm = farm.AddMenu("Farm", "Q");
            qFarm.AddBool("QLastHit", "Q Last Hit (Only Killable)");
            qFarm.AddBool("QLaneClear", "Q LaneClear (All)");
            qFarm.AddBool("QFarmAA", "Only Q out of AA Range", false);
            qFarm.AddSlider("QFarmMana", "Q Min Mana Percent", 40);

            var eFarm = farm.AddMenu("E", "E");
            eFarm.AddBool("ELaneClear", "Use in LaneClear");

            farm.AddKeyBind("FarmEnabled", "Farm Enabled", 'J', KeyBindType.Toggle, true);
            farm.AddInfo("FarmInfo", " --> Enabled in LaneClear and LastHit", LorahColor);
            farm.AddBool("ItemsLaneClear", "Use Items in LaneClear");

            var draw = Menu.AddMenu("Drawing", "Drawing");
            draw.AddCircle("QDraw", "Draw Q", System.Drawing.Color.Purple, Q.Range);
            draw.AddCircle("WDraw", "Draw W", System.Drawing.Color.DeepPink, W.Range);
            draw.AddCircle("RDraw", "Draw R", System.Drawing.Color.White, R.Range);
            draw.AddBool("DuelistDraw", "Duelist Mode: Killable Target");
            draw.AddBool("FarmPermashow", "Permashow Farm Enabled");
            draw.AddBool("RPermashow", "Permashow R Mode");

            if (draw.Item("RPermashow").IsActive())
            {
                rMenu.Item("RMode").Permashow(true, null, LorahColor);
//.........这里部分代码省略.........
开发者ID:realcruiser,项目名称:LeagueSharp,代码行数:101,代码来源:Program.cs

示例2: Game_OnGameLoad

        private static void Game_OnGameLoad(EventArgs args)
        {
            if (!Player.IsChampion("Leblanc"))
            {
                return;
            }

            #region Menu

            Menu = new Menu("LeBlanc The Schemer", "LeBlanc", true);

            Orbwalker = Menu.AddOrbwalker();
            Menu.AddTargetSelector();

            var combo = new Combo();
            Menu.AddSubMenu(Combo.LocalMenu);

            var harass = new Harass();
            Menu.AddSubMenu(Harass.LocalMenu);

            var laneclear = new LaneClear();
            Menu.AddSubMenu(LaneClear.LocalMenu);

            var flee = new Flee();
            Menu.AddSubMenu(Flee.LocalMenu);

            var clone = new Clone();
            Menu.AddSubMenu(Clone.LocalMenu);

            var draw = Menu.AddMenu("Draw Settings", "Draw");
            draw.AddItem(new MenuItem("Draw0", "Draw Q Range").SetValue(new Circle(true, Color.Red, Q.Range)));
            draw.AddItem(new MenuItem("Draw1", "Draw W Range").SetValue(new Circle(false, Color.Red, W.Range)));
            draw.AddItem(new MenuItem("Draw2", "Draw E Range").SetValue(new Circle(true, Color.Purple, E.Range)));
            draw.AddBool("DrawCD", "Draw on CD");
            draw.AddBool("DamageIndicator", "Damage Indicator");

            var misc = Menu.AddMenu("Misc Settings", "Misc");

            var ks = new KillSteal();
            misc.AddSubMenu(KillSteal.LocalMenu);

            misc.AddBool("Interrupt", "Interrupt Spells");
            misc.AddBool("AntiGapcloser", "AntiGapCloser");
            misc.AddBool("Sounds", "Sounds");
            misc.AddBool("Troll", "Troll");

            Menu.AddToMainMenu();

            #endregion

            DamageIndicator.DamageToUnit = GetComboDamage;

            if (misc.Item("Sounds").GetValue<bool>())
            {
                var sound = new SoundObject(Resources.OnLoad);
                sound.Play();
            }

            Game.PrintChat(
                "<b><font color =\"#FFFFFF\">LeBlanc the Schemer by </font><font color=\"#0033CC\">Trees</font><font color =\"#FFFFFF\"> loaded!</font></b>");

            Drawing.OnDraw += Drawing_OnDraw;
            Interrupter2.OnInterruptableTarget += Interrupter2_OnInterruptableTarget;
            //Interrupter2_OnInterruptableTarget;
            AntiGapcloser.OnEnemyGapcloser += AntiGapcloser_OnEnemyGapcloser;
        }
开发者ID:zjian1013,项目名称:tr33s,代码行数:66,代码来源:Program.cs

示例3: Game_OnGameLoad

        private static void Game_OnGameLoad(EventArgs args)
        {
            if (Player.ChampionName != "Fiora")
            {
                return;
            }

            Q = new Spell(SpellSlot.Q, 400 + 175);
            Q.SetSkillshot(.25f, 0, 500, false, SkillshotType.SkillshotLine);

            W = new Spell(SpellSlot.W, 750);
            W.SetSkillshot(0.5f, 95, 3000, false, SkillshotType.SkillshotLine);

            E = new Spell(SpellSlot.E);

            R = new Spell(SpellSlot.R, 500);
            R.SetTargetted(.066f, 500);

            Menu = new Menu("jesuisFiora", "jesuisFiora", true);

            Orbwalker = Menu.AddOrbwalker();

            Menu.AddTargetSelector();

            var comboMenu = Menu.AddMenu("Combo", "Combo");
            comboMenu.AddBool("QCombo", "Use Q");
            comboMenu.AddBool("WCombo", "Use W");
            comboMenu.AddBool("ECombo", "Use E");
            comboMenu.AddBool("RCombo", "Use R");
            comboMenu.AddBool("RComboSelected", "Use R Selected Only");
            comboMenu.AddBool("ItemsCombo", "Use Items");

            var harassMenu = Menu.AddMenu("Harass", "Harass");
            harassMenu.AddBool("QHarass", "Use Q");
            harassMenu.AddBool("WHarass", "Use W");
            harassMenu.AddBool("EHarass", "Use E");
            harassMenu.AddBool("ItemsHarass", "Use Items");
            harassMenu.AddSlider("ManaHarass", "Min Mana Percent", 40);

            var farmMenu = Menu.AddMenu("Farm", "Farm");
            farmMenu.AddBool("QLastHit", "Q Last Hit (Only Killable)");
            farmMenu.AddBool("QLaneClear", "Q LaneClear (All)");
            farmMenu.AddSlider("QFarmMana", "Q Min Mana Percent", 40);
            farmMenu.AddBool("ELaneClear", "Use E LaneClear");
            farmMenu.AddBool("ItemsLaneClear", "Use Items");

            var miscMenu = Menu.AddMenu("Misc", "Misc");

            var qMisc = miscMenu.AddMenu("Q", "Q");
            qMisc.AddKeyBind("QFlee", "Q Flee", 'T');
            qMisc.AddBool("QGapClose", "Q Flee on Gapclose");

            var wMisc = miscMenu.AddMenu("W", "W");
            wMisc.AddBool("WTurret", "W Target Under Enemy Turret");
            wMisc.AddBool("WSpells", "W Incoming Spells");

            var rMisc = miscMenu.AddMenu("R", "R");
            rMisc.AddKeyBind("RKill", "Duelist Mode", 'H', KeyBindType.Toggle, true);
            rMisc.AddSlider("RKillVital", "Duelist Mode Min Vitals", 1, 0, 4);
            rMisc.AddBool("PermaShow", "PermaShow");

            if (rMisc.Item("PermaShow").IsActive())
            {
                rMisc.Item("RKill").Permashow(true, null, Color.DeepPink);
            }

            //miscMenu.AddBool("OrbwalkPassive", "Orbwalk to Passive Position");
            miscMenu.AddBool("Sounds", "Sounds");

            var drawMenu = Menu.AddMenu("Drawing", "Drawing");
            drawMenu.AddBool("QDraw", "Draw Q");
            drawMenu.AddBool("WDraw", "Draw W");
            drawMenu.AddBool("RDraw", "Draw R");
            drawMenu.AddBool("DuelistDraw", "Duelist Killable Drawing");

            var dmg = drawMenu.AddMenu("DamageIndicator", "Damage Indicator");
            dmg.AddBool("DamageIndicator", "Draw Damage Indicator");
            dmg.AddCircle("HPColor", "Predicted Health Color", System.Drawing.Color.White);
            dmg.AddCircle("FillColor", "Damage Color", System.Drawing.Color.DeepPink);

            Menu.AddToMainMenu();

            if (miscMenu.Item("Sounds").GetValue<bool>())
            {
                var sound = new SoundObject(Resources.OnLoad);
                sound.Play();
            }

            DamageIndicator.DamageToUnit = GetComboDamage;

            Game.OnUpdate += Game_OnGameUpdate;
            Orbwalking.AfterAttack += AfterAttack;
            Obj_AI_Base.OnProcessSpellCast += Obj_AI_Hero_OnProcessSpellCast;
            AntiGapcloser.OnEnemyGapcloser += AntiGapcloser_OnEnemyGapcloser;
            Drawing.OnDraw += Drawing_OnDraw;
            Game.PrintChat("jesuisFiora Loaded!");
        }
开发者ID:4caky,项目名称:LeagueSharp,代码行数:97,代码来源:Program.cs

示例4: Game_OnGameLoad

        private static void Game_OnGameLoad(EventArgs args)
        {
            if (!Player.IsChampion("Ahri"))
            {
                return;
            }

            Menu = new Menu("Babehri", "Babehri", true);

            Orbwalker = Menu.AddOrbwalker();
            Menu.AddTargetSelector();

            var combo = Menu.AddMenu("Combo", "Combo");
            combo.AddBool("ComboQ", "Use Q");
            combo.AddBool("ComboW", "Use W");
            combo.AddSlider("ComboWMinHit", "Min Fox-Fire Hits", 2, 0, 3);
            combo.AddBool("ComboE", "Use E");
            //combo.AddItem(new MenuItem("ComboItems", "Use Items").SetValue(true));

            var harass = Menu.AddMenu("Harass", "Harass");
            harass.AddBool("HarassQ", "Use Q");
            harass.AddBool("HarassW", "Use W");
            harass.AddSlider("HarassWMinHit", "Min Fox-Fire Hits", 2, 0, 3);
            harass.AddBool("HarassE", "Use E");
            harass.AddSlider("HarassMinMana", "Min Mana Percent", 30);

            var farm = Menu.AddMenu("Farm", "Farm");
            farm.AddBool("FarmQ", "Smart Farm with Q");
            farm.AddSlider("FarmQHC", "Q Min HitCount", 3, 1, 5);
            farm.AddBool("FarmQLH", "Save Q for LH", false);
            farm.AddBool("FarmW", "Farm W (LC)", false);
            farm.AddSlider("FarmMana", "Minimum Mana %", 50);

            var misc = Menu.AddMenu("Misc", "Misc");
            var eMisc = misc.AddMenu("E", "E");
            eMisc.AddBool("GapcloseE", "Use E on Gapclose");
            eMisc.AddBool("InterruptE", "Use E to Interrupt");
            var rMisc = misc.AddMenu("R", "R");
            rMisc.AddSlider("DamageR", "R Dmg Prediction Bolt Count", 2, 0, 3);
            rMisc.AddKeyBind("FleeR", "Use R Flee", 'T');

            var drawing = Menu.AddMenu("Drawing", "Drawing");

            var damage = drawing.AddMenu("Damage Indicator", "Damage Indicator");
            damage.AddBool("Enabled", "Enabled");
            damage.AddCircle("HPColor", "Health Color", System.Drawing.Color.White);
            damage.AddCircle("FillColor", "Damage Color", System.Drawing.Color.DeepPink);
            damage.AddBool("DmgEnabled", "Killable");

            drawing.AddCircle("DrawQ", "Draw Q", System.Drawing.Color.DeepPink, Spells.Q.Range);
            drawing.AddCircle("DrawW", "Draw W", System.Drawing.Color.White, Spells.W.Range, false);
            drawing.AddCircle("DrawE", "Draw E", System.Drawing.Color.MediumVioletRed, Spells.E.Range);
            drawing.AddCircle("DrawR", "Draw R", System.Drawing.Color.Cyan, Spells.R.Range);
            drawing.AddCircle("DrawPassive", "Draw Passive Stack", System.Drawing.Color.White);

            Menu.AddToMainMenu();

            PassiveText.VisibleCondition += sender => Menu.Item("DrawPassive").IsActive();
            PassiveText.Add();

            DamageIndicator.DamageToUnit = GetComboDamage;

            Game.OnUpdate += Game_OnUpdate;
            Drawing.OnDraw += Drawing_OnDraw;
            Orbwalking.AfterAttack += Orbwalking_AfterAttack;
            Obj_AI_Base.OnProcessSpellCast += Obj_AI_Base_OnProcessSpellCast;
            Interrupter2.OnInterruptableTarget += Interrupter2_OnInterruptableTarget;
            AntiGapcloser.OnEnemyGapcloser += AntiGapcloser_OnEnemyGapcloser;
            GameObject.OnCreate += GameObject_OnCreate;
            GameObject.OnDelete += GameObject_OnDelete;
        }
开发者ID:StopMotionCuber,项目名称:LeagueSharp-1,代码行数:71,代码来源:Program.cs

示例5: Game_OnGameLoad

        private static void Game_OnGameLoad(EventArgs args)
        {
            if (!Player.IsChampion("Kindred"))
            {
                return;
            }

            Menu = new Menu("KindredSpirits", "KindredSpirits", true);
            Menu.SetFontStyle(FontStyle.Regular, ScriptColor);

            Orbwalker = Menu.AddOrbwalker();
            Menu.AddTargetSelector();

            var spells = Menu.AddMenu("Spells", "Spells");

            var qMenu = spells.AddMenu("Q", "Q");
            qMenu.AddBool("QCombo", "Use in Combo");
            qMenu.AddBool("QHarass", "Use in Harass");
            qMenu.AddBool("QSafety", "Q Safety Check");
            qMenu.AddBool("QKiteMachine", "Q KiteMachine");
            qMenu.AddInfo("KiteInfo", " --> Q's towards cursor position if enemy will be hit.", ScriptColor);
            qMenu.AddKeyBind("QFlee", "Q Flee", 'T');
            qMenu.AddInfo("FleeInfo", " --> Flees towards cursor position.", ScriptColor);
            qMenu.AddBool("QGapClose", "AntiGapclose with Q");
            qMenu.AddBool("QKillsteal", "Use for Killsteal");

            var wMenu = spells.AddMenu("W", "W");
            wMenu.AddBool("WCombo", "Use in Combo");
            wMenu.AddBool("WHarass", "Use in Harass");

            var eMenu = spells.AddMenu("E", "E");
            eMenu.AddBool("ECombo", "Use in Combo");
            eMenu.AddBool("EHarass", "Use in Harass");
            eMenu.AddBool("EBeforeAttack", "Only Use E Before Attack", false);
            eMenu.AddInfo("BeforeAttackInfo", " --> When enemy is close to leaving AA range.", ScriptColor);
            eMenu.AddBool("ESelectedTarget", "Only E Selected Target", false);

            var rMenu = spells.AddMenu("R", "R");

            var savingMenu = rMenu.AddMenu("SavingMode", "Saving Spirits Settings");
            var allyMenu = savingMenu.AddMenu("RAlly", "Allied Champions");

            foreach (var ally in Allies.Where(a => !a.IsMe))
            {
                allyMenu.AddBool("R" + ally.ChampionName, "Use on " + ally.ChampionName);
                allyMenu.AddSlider("RHP" + ally.ChampionName, "Health Percent", 15);
            }

            savingMenu.AddSlider("SavingAllies", "Minimum Allies In Range", 2, 0, 5);
            savingMenu.AddSlider("SavingEnemies", "Maximum Enemies In Range", 2, 0, 5);

            rMenu.AddBool("RCombo", "Use R");
            rMenu.AddSlider("RSelf", "Self Health Percent", 15);

            var items = spells.AddMenu("Items", "Items");
            items.AddBool("ItemsCombo", "Use in Combo");
            items.AddBool("ItemsHarass", "Use in Harass");

            spells.AddBool("IgniteKillsteal", "Ignite Killsteal");
            spells.AddBool("SmiteKillsteal", "Smite Killsteal");
            spells.AddSlider("ManaHarass", "Harass Min Mana Percent", 40);

            var farm = Menu.AddMenu("Farm", "Farm");
            farm.AddBool("QLaneClear", "Q LaneClear");
            farm.AddBool("QJungleClear", "Q Jungle Clear");
            farm.AddSlider("QFarmMana", "Q Min Mana Percent", 40);
            farm.AddBool("WLaneClear", "Farm with W");
            farm.AddBool("EJungleClear", "E Jungle Clear");

            farm.AddKeyBind("FarmEnabled", "Farm Enabled", 'J', KeyBindType.Toggle, true);
            farm.AddInfo("FarmInfo", " --> Enabled in LaneClear and LastHit", ScriptColor);
            farm.AddBool("ItemsLaneClear", "Use Items in LaneClear");

            var draw = Menu.AddMenu("Drawing", "Drawing");
            draw.AddCircle("0Draw", "Draw Q", System.Drawing.Color.Purple, SpellManager.Q.Range);
            draw.AddCircle("1Draw", "Draw W", System.Drawing.Color.DeepPink, SpellManager.W.Range);
            draw.AddCircle("2Draw", "Draw E", System.Drawing.Color.Blue, SpellManager.E.Range);
            draw.AddCircle("3Draw", "Draw R", System.Drawing.Color.White, SpellManager.R.Range);
            draw.AddBool("FarmPermashow", "Permashow Farm Enabled");

            if (draw.Item("FarmPermashow").IsActive())
            {
                farm.Item("FarmEnabled").Permashow(true, null, ScriptColor);
            }

            draw.Item("FarmPermashow").ValueChanged +=
                (sender, eventArgs) =>
                {
                    farm.Item("FarmEnabled").Permashow(eventArgs.GetNewValue<bool>(), null, ScriptColor);
                };

            var dmg = draw.AddMenu("DamageIndicator", "Damage Indicator");
            dmg.AddBool("DmgEnabled", "Draw Damage Indicator");
            dmg.AddCircle("HPColor", "Predicted Health Color", System.Drawing.Color.White);
            dmg.AddCircle("FillColor", "Damage Color", System.Drawing.Color.Blue);
            dmg.AddBool("Killable", "Killable Text");

            PassiveManager.Initialize();

            //Menu.AddBool("Sounds", "Sounds");
//.........这里部分代码省略.........
开发者ID:ScarletRapier,项目名称:LeagueSharp,代码行数:101,代码来源:Program.cs


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