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


C# Common.Menu类代码示例

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


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

示例1: Game_OnGameLoad

        private static void Game_OnGameLoad(EventArgs args)
        {
            EQDrawList = new List<Vector3>();
            Player = ObjectManager.Player;
            if (Player.ChampionName != ChampionName) return;
            Q = new Spell(SpellSlot.Q, 700f);
            Q.SetSkillshot(0.5f, 70f, float.MaxValue, false, SkillshotType.SkillshotLine);

            W = new Spell(SpellSlot.W, 300f);

            E = new Spell(SpellSlot.E, 830f);
            E.SetSkillshot(0.5f, 70f, float.MaxValue, false, SkillshotType.SkillshotCircle);
            Config = new Menu("J4Helper", "J4Helper", true);
            //Orbwalker
            Config.AddSubMenu(new Menu("Orbwalking", "Orbwalking"));
            Orbwalker = new Orbwalking.Orbwalker(Config.SubMenu("Orbwalking"));

            //Misc
            Config.AddSubMenu(new Menu("Keys", "Keys"));
            Config.SubMenu("Keys")
                .AddItem(
                    new MenuItem("EQMouse", "EQ to Mouse").SetValue(new KeyBind("T".ToCharArray()[0], KeyBindType.Press)));
            Config.AddToMainMenu();
            Game.OnUpdate += Game_OnUpdate;
            Drawing.OnDraw += Drawing_OnDraw;
            Game.PrintChat("J4Helper Loaded.");
            Obj_AI_Base.OnProcessSpellCast += Obj_AI_Base_OnProcessSpellCast;
        }
开发者ID:AlrikSharp,项目名称:LeagueSharp,代码行数:28,代码来源:J4.cs

示例2: CreateMenu

 private static void CreateMenu()
 {
     Menu = new Menu("AIOAuto", "menu", true);
     Menu.AddItem(new MenuItem("timer", "timer")).SetValue(new Slider(500, 200, 5000));
     Menu.AddItem(new MenuItem("dbbuff", "Simple Buff Checker")).SetValue(new KeyBind("T".ToCharArray()[0], KeyBindType.Press, false));
     Menu.AddToMainMenu();
 }
开发者ID:SmokyBot,项目名称:LS,代码行数:7,代码来源:AIOAuto.cs

示例3: AddToMenu

        public static void AddToMenu(Menu menu, List<Spell> spells)
        {
            try
            {
                _menu = menu;

                spells =
                    spells.DistinctBy(s => s.Slot)
                        .Where(s => s.Slot != SpellSlot.Unknown && (s.IsSkillshot || s.Range > 0f))
                        .ToList();

                foreach (var spell in spells)
                {
                    _menu.AddItem(
                        new MenuItem(_menu.Name + "." + spell.Slot, "Use " + spell.Slot).SetValue(
                            spell.Slot != SpellSlot.R && spell.Instance.Cooldown < 20));
                }

                _menu.AddItem(
                    new MenuItem(_menu.Name + ".min-distance", "Min. Enemy Distance").SetValue(
                        new Slider(1000, 200, 3000)));
                _menu.AddItem(new MenuItem(_menu.Name + ".min-mana", "Min. Mana %").SetValue(new Slider(95, 1)));
                _menu.AddItem(new MenuItem(_menu.Name + ".fountain", "Only Inside Fountain").SetValue(false));
                _menu.AddItem(new MenuItem(_menu.Name + ".enabled", "Enabled").SetValue(false));

                _spells = spells.OrderBy(s => s.ManaCost).ThenBy(s => s.Instance.Cooldown).ToList();
                Core.OnPostUpdate += OnCorePostUpdate;
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
开发者ID:Lizzaran,项目名称:LeagueSharp-Standalones,代码行数:33,代码来源:TearStackManager.cs

示例4: Game_OnGameLoad

 private static void Game_OnGameLoad(EventArgs args)
 {
     Config = new Menu("Tracker", "Tracker", true);
     HbTracker.AttachToMenu(Config);
     WardTracker.AttachToMenu(Config);
     Config.AddToMainMenu();
 }
开发者ID:Backup521,项目名称:Sion,代码行数:7,代码来源:Program.cs

示例5: Game_OnGameLoad

        private static void Game_OnGameLoad(EventArgs args)
        {
            Config = new Menu("SharpChatLiner", "SharpChatLiner", true);

            Config.AddSubMenu(new Menu("Text 1", "Text 1"));
            Config.SubMenu("Text 1").AddItem(new MenuItem("1", "Say txt File 1").SetValue(new KeyBind("1".ToCharArray()[0], KeyBindType.Press)));
            Config.SubMenu("Text 1").AddItem(new MenuItem("ALL1", "Say txt File 1 To ALL")).SetValue(false);

            Config.AddSubMenu(new Menu("Text 2", "Text 2"));
            Config.SubMenu("Text 2").AddItem(new MenuItem("2", "Say txt File 2").SetValue(new KeyBind("2".ToCharArray()[0], KeyBindType.Press)));
            Config.SubMenu("Text 2").AddItem(new MenuItem("ALL2", "Say txt File 2 To ALL")).SetValue(false);

            Config.AddSubMenu(new Menu("Text 3", "Text 3"));
            Config.SubMenu("Text 3").AddItem(new MenuItem("3", "Say txt File 3").SetValue(new KeyBind("3".ToCharArray()[0], KeyBindType.Press)));
            Config.SubMenu("Text 3").AddItem(new MenuItem("ALL3", "Say txt File 3 To ALL")).SetValue(false);

            Config.AddSubMenu(new Menu("Text 4", "Text 4"));
            Config.SubMenu("Text 4").AddItem(new MenuItem("4", "Say txt File 4").SetValue(new KeyBind("4".ToCharArray()[0], KeyBindType.Press)));
            Config.SubMenu("Text 4").AddItem(new MenuItem("ALL4", "Say txt File 4 To ALL")).SetValue(false);

            Config.AddSubMenu(new Menu("Text 5", "Text 5"));
            Config.SubMenu("Text 5").AddItem(new MenuItem("5", "Say txt File 5").SetValue(new KeyBind("5".ToCharArray()[0], KeyBindType.Press)));
            Config.SubMenu("Text 5").AddItem(new MenuItem("ALL5", "Say txt File 5 To ALL")).SetValue(false);

            Config.AddSubMenu(new Menu("Text 6", "Text 6"));
            Config.SubMenu("Text 6").AddItem(new MenuItem("6", "Say txt File 6").SetValue(new KeyBind("6".ToCharArray()[0], KeyBindType.Press)));
            Config.SubMenu("Text 6").AddItem(new MenuItem("ALL6", "Say txt File 6 To ALL")).SetValue(false);

            Config.AddToMainMenu();

            Game.OnGameUpdate += OnGameUpdate;
            Game.PrintChat("<font color='#FF00BF'>Sharp Chat Liner Loaded By</font> <font color='#FF0000'>The</font><font color='#FFFF00'>Kush</font><font color='#40FF00'>Style</font>");
        }
开发者ID:uuyh654987,项目名称:LeagueSharp,代码行数:33,代码来源:Program.cs

示例6: SFXUtility

        public SFXUtility()
        {
            try
            {
                Menu = new Menu(Name, Name, true);

                var miscMenu = new Menu("Misc", "Misc");

                var infoMenu = new Menu("Info", "Info");
                infoMenu.AddItem(new MenuItem("InfoVersion", string.Format("Version: {0}", Version)));
                infoMenu.AddItem(new MenuItem("InfoIRC", "IRC: Appril"));
                infoMenu.AddItem(new MenuItem("InfoGithub", "Github:").SetValue(new StringList(new[]
                {
                    "Smokyfox",
                    "Lizzaran",
                    "zUsername"
                })));

                miscMenu.AddSubMenu(infoMenu);

                miscMenu.AddItem(new MenuItem("MiscCircleThickness", "Circles Thickness").SetValue(new Slider(3, 10, 1)));

                Menu.AddSubMenu(miscMenu);
                AppDomain.CurrentDomain.DomainUnload += OnExit;
                AppDomain.CurrentDomain.ProcessExit += OnExit;
                CustomEvents.Game.OnGameEnd += OnGameEnd;
                Game.OnGameEnd += OnGameEnd;
                CustomEvents.Game.OnGameLoad += OnGameLoad;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }
开发者ID:09samed09,项目名称:LeagueSharp2,代码行数:34,代码来源:SFXUtility.cs

示例7: AddToMenu

        public static void AddToMenu(Menu theMenu)
        {
            _myMenu = theMenu;

            //add item list to menu
            CreateList();

            var offensiveItem = new Menu("Offensive Items", "Offensive Items");
            {
                foreach (var item in ItemList)
                {
                    AddOffensiveItem(offensiveItem, item);
                }
                _myMenu.AddSubMenu(offensiveItem);
            }

            var summoners = new Menu("Summoners", "Summoners");
            {
                var ignite = new Menu("Ignite", "Ignite");
                {
                    ignite.AddItem(new MenuItem("ignite", "Use Ignite", true).SetValue(true));
                    ignite.AddItem(
                        new MenuItem("igniteMode", "Ignite Mode", true).SetValue(new StringList(new[] { "Combo", "KS" })));
                    summoners.AddSubMenu(ignite);
                }
                _myMenu.AddSubMenu(summoners);
            }

            Orbwalking.AfterAttack += AfterAttack;
            Orbwalking.OnAttack += OnAttack;
            Game.OnUpdate += Game_OnGameUpdate;
        }
开发者ID:fgpmaia123,项目名称:LeagueSharp-18,代码行数:32,代码来源:ActiveItems.cs

示例8: Init

        public static void Init()
        {
            Map = Utility.Map.GetMap().Type;
            if (Map != Utility.Map.MapType.HowlingAbyss) return;
            Config = new Menu("AIM: " + ObjectManager.Player.ChampionName,
                "autosharp." + ObjectManager.Player.ChampionName, true);
            Config.AddItem(new MenuItem("autosharp.quit", "Quit after Game End").SetValue(true));
            var options = Config.AddSubMenu(new Menu("Options: ", "autosharp.options"));
            options.AddItem(new MenuItem("autosharp.options.healup", "Take Heals?").SetValue(true));
            var orbwalker = Config.AddSubMenu(new Menu("Orbwalker", "autosharp.orbwalker"));

            new PluginLoader();

            Cache.Load();
            Game.OnUpdate += Positioning.OnUpdate;
            Autoplay.Load();
            Game.OnEnd += OnEnd;
            Obj_AI_Base.OnIssueOrder += AntiShrooms;
            Game.OnUpdate += AntiShrooms2;
            Spellbook.OnCastSpell += OnCastSpell;
            Obj_AI_Base.OnDamage += OnDamage;


            Orbwalker = new MyOrbwalker.Orbwalker(orbwalker);

            Utility.DelayAction.Add(
                new Random().Next(1000, 10000), () =>
                {
                    new LeagueSharp.Common.AutoLevel(Utils.AutoLevel.GetSequence().Select(num => num - 1).ToArray());
                    LeagueSharp.Common.AutoLevel.Enable();
                    Console.WriteLine("AutoLevel Init Success!");
                });
        }
开发者ID:Hyunabstar,项目名称:Experimental,代码行数:33,代码来源:Program.cs

示例9: AddToMenu

        public static void AddToMenu(Menu menu,
            string uniqueId,
            HealthCheckType checkType,
            HealthValueType valueType,
            string prefix = null,
            int value = 30,
            int minValue = 0,
            int maxValue = 100)
        {
            try
            {
                if (Menues.ContainsKey(uniqueId))
                {
                    throw new ArgumentException(
                        string.Format("HealthHealthger: UniqueID \"{0}\" already exist.", uniqueId));
                }

                menu.AddItem(
                    new MenuItem(
                        menu.Name + ".health-" + uniqueId,
                        (!string.IsNullOrEmpty(prefix) ? prefix + " " : string.Empty) +
                        (checkType == HealthCheckType.Minimum ? "Min. Health" : "Max. Health") +
                        (valueType == HealthValueType.Percent ? " %" : string.Empty)).SetValue(
                            new Slider(value, minValue, maxValue)));

                Menues[uniqueId] = new Tuple<Menu, HealthCheckType, HealthValueType>(menu, checkType, valueType);
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
开发者ID:fgpmaia123,项目名称:LeagueSharp-Standalones,代码行数:32,代码来源:HealthManager.cs

示例10: Load

        public static void Load()
        {
            ks = Menu.AddSubMenu("KillSteal", "KillSteal");
            ks.Add("SpellsKS", new CheckBox("KS Spells"));
            ks.Add("ComboSmite", new CheckBox("Smite"));
            ks.Add("ComboIgnite", new CheckBox("Ignite"));

            jngl = Menu.AddSubMenu("Jungle", "Jungle");
            jngl.Add("jnglQ", new Slider("Use Javelin Mana %", 15, 0, 100));
            jngl.Add("jnglHeal", new Slider("Auto Heal", 15, 0, 95));

            heal = Menu.AddSubMenu("Heal", "Heal Manager");
            heal.Add("allyHeal", new Slider("Heal Allies Hp <= %", 45, 0, 80));
            heal.Add("SelfHeal", new Slider("Self Heal Hp <= %", 80, 0, 90));
            heal.Add("ManaHeal", new Slider("Mana <= %", 20, 0, 100));

            misc = Menu.AddSubMenu("Misc", "Misc");
            misc.Add("Gapcloser", new CheckBox("Gapcloser"));
            misc.Add("manaW", new Slider("Use W Mana %", 15, 0, 100));

            draw = Menu.AddSubMenu("Draw", "Draw");
            draw.Add("dind", new CheckBox("Draw damage indicator"));
            draw.Add("EngageDraw", new CheckBox("Engage Range"));
            draw.Add("fleeDraw", new CheckBox("Draw Flee Spots"));

            flee = Menu.AddSubMenu("Flee", "Flee");
            flee.Add("FleeMouse", new KeyBind("Flee (BETA)", false, KeyBind.BindTypes.HoldActive, 'A'));
        }
开发者ID:yMeliodasNTD,项目名称:PortAIO,代码行数:28,代码来源:MenuConfig.cs

示例11: Evader

        public Evader(out Menu _evade, EvadeMethods method = EvadeMethods.None, Spell spl = null)
        {
            SpecialMethod = method;
            EvadeSpell = spl;
            evade = new Menu("Evade", "Evade");

            foreach (var enemy in HeroManager.Enemies)
            {
                foreach (var spell in SpellDatabase.EvadeableSpells.Where(p => p.ChampionName == enemy.ChampionName && p.EvadeMethods.HasFlag(method)))
                    evade.AddItem(new MenuItem(spell.SpellName, String.Format("{0} ({1})", spell.ChampionName, spell.Slot)).SetValue(true));
            }

            evade.AddItem(new MenuItem("EVADEMETHOD", "Evade Method: ").SetValue(new StringList(new[] { "Near Turret", "Less Enemies", "Auto" }, 2)));
            evade.AddItem(new MenuItem("EVADEENABLE", "Enabled").SetValue(false));

            if (method.HasFlag(EvadeMethods.MorganaE) || method.HasFlag(EvadeMethods.KayleR))
            {
                shieldAlly = new Menu("Ally Shielding", "allyshield");
                foreach (var ally in HeroManager.Allies)
                    if(!ally.IsMe)
                        shieldAlly.AddItem(new MenuItem("shield" + ally.ChampionName, "Shield " + ally.ChampionName).SetValue(true));

                shieldAlly.AddItem(new MenuItem("SHIELDENABLED", "Enabled").SetValue(true));
                evade.AddSubMenu(shieldAlly);
            }

            _evade = evade;
            m_evade_thread = new Thread(new ThreadStart(EvadeThread));
            m_evade_thread.Start();
            Game.OnUpdate += Game_OnUpdate;
            Obj_AI_Base.OnProcessSpellCast += Obj_AI_Base_OnProcessSpellCast;

            Game.PrintChat("<font color='#ff3232'>Shine#: </font><font color='#d4d4d4'>Evader loaded for champion {0} !</font>", ObjectManager.Player.ChampionName);
        }
开发者ID:47110572,项目名称:LeagueSharp,代码行数:34,代码来源:Evader.cs

示例12: Initialize

        public static void Initialize()
        {
            #region Initialize Menu
            Config = new Menu("SPredictioner", "spredictioner", true);
            TargetSelector.AddToMenu(Config.SubMenu("Target Selector"));
            Config.AddItem(new MenuItem("COMBOKEY", "Combo").SetValue(new KeyBind(32, KeyBindType.Press)));
            Config.AddItem(new MenuItem("HARASSKEY", "Harass").SetValue(new KeyBind('C', KeyBindType.Press)));
            Config.AddItem(new MenuItem("ENABLED", "Enabled").SetValue(true));
            SPrediction.Prediction.Initialize(Config);
            Config.SubMenu("SPRED").AddItem(new MenuItem("SPREDHITC", "Hit Chance").SetValue(new StringList(ShineCommon.Utility.HitchanceNameArray, 2)));
            Config.AddToMainMenu();
            #endregion

            #region Initialize Events
            Spellbook.OnCastSpell += EventHandlers.Spellbook_OnCastSpell;
            Obj_AI_Hero.OnProcessSpellCast += EventHandlers.Obj_AI_Hero_OnProcessSpellCast;
            #endregion

            #region Initialize Spells
            foreach (var spell in SpellDatabase.Spells)
            {
                if (spell.ChampionName == ObjectManager.Player.CharData.BaseSkinName)
                {
                    Spells[(int)spell.Slot] = new Spell(spell.Slot, spell.Range);
                    Spells[(int)spell.Slot].SetSkillshot(spell.Delay / 1000, spell.Radius, spell.MissileSpeed, spell.Collisionable, spell.Type);
                }
            }
            #endregion
        }
开发者ID:47110572,项目名称:LeagueSharp,代码行数:29,代码来源:SPredictioner.cs

示例13: Game_OnGameLoad

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

            _w = new Spell(SpellSlot.W, wRange);
            _w.SetSkillshot(0.25f, 120f, 1400f, false, SkillshotType.SkillshotCircle);
            _e = new Spell(SpellSlot.E, eRange);

            _config = new Menu("Twitch", "Twitch", true);

            _orbwalker = new Orbwalking.Orbwalker(_config.SubMenu("Orbwalking"));

            var targetSelectorMenu = new Menu("Target Selector", "Target Selector");
            TargetSelector.AddToMenu(targetSelectorMenu);
            _config.AddSubMenu(targetSelectorMenu);

            _config.SubMenu("Combo").AddItem(new MenuItem("UseWCombo", "Use W").SetValue(true));
            _config.SubMenu("Combo").AddItem(new MenuItem("ghost", "Use Ghostblade").SetValue(true));
            _config.SubMenu("Combo").AddItem(new MenuItem("botrk", "Use Botrk").SetValue(true));

            _config.SubMenu("Drawings").AddItem(new MenuItem("ultDraw", "Draw ult range").SetValue(true));
            _config.SubMenu("Drawings").AddItem(new MenuItem("EDamage", "E Damage").SetValue(new Circle(true, Color.White)));
            _config.SubMenu("Drawings").AddItem(new MenuItem("stealthColor", "Stealth indicator").SetValue(new Circle(true, Color.Purple)));

            _config.AddToMainMenu();

            CustomDamageIndicator.Initialize(GetEDamage);
            Game.OnUpdate += Game_OnUpdate;
            Drawing.OnDraw += Drawing_OnDraw;
            Obj_AI_Base.OnProcessSpellCast += OnSpellProcess;
            Obj_AI_Base.OnDamage += OnDamage;
        }
开发者ID:Aferii,项目名称:LeagueSharp,代码行数:33,代码来源:Program.cs

示例14: LuxMain

        private static void LuxMain(EventArgs args)
        {
            Player = ObjectManager.Player;

            if (Player.BaseSkinName != "Lux")
            {
                return;
            }


            Config = LuxMenu.CreateMenu();

            Config.AddToMainMenu();

            InitializeSpells();

            ObjectHandling();

            AntiGapcloser.OnEnemyGapcloser += OnGapClose;

            Interrupter2.OnInterruptableTarget += OnInterruptableTarget;

            Game.OnUpdate += OnUpdate;
            Game.OnUpdate += CheckKillable;
            Drawing.OnDraw += OnDraw;
        }
开发者ID:ninja1234567,项目名称:LeagueSharp,代码行数:26,代码来源:Lux.cs

示例15: ComboMenu

 public override void ComboMenu(Menu config)
 {
     config.AddBool("Combo.Q", "Use Q", true);
     config.AddBool("Combo.W", "Use W", true);
     config.AddBool("Combo.R", "Use R", true);
     config.AddSlider("Combo.R.Health", "Health to Ult", 15, 1, 100);
 }
开发者ID:654955321,项目名称:HY_Recommend,代码行数:7,代码来源:Janna.cs


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