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


C# Menu.IsBool方法代码示例

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


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

示例1: LoadMenu


//.........这里部分代码省略.........
            }
            #endregion

            #region KSMenu
            var KSmenu = new Menu("KS", "KS");
            {
                KSmenu.AddItem(new MenuItem("KS-UseR", "Use R Smart KS", true).SetValue(true));

                config.AddSubMenu(KSmenu);
            }
            #endregion

            #region InitatorMenu
            var initator = new Menu("Initiator", "Initiator");
            {
                initator.AddItem(new MenuItem("useInitiator", "Use Initiator", true)).SetValue(true);
                foreach (Obj_AI_Hero hero in ObjectManager.Get<Obj_AI_Hero>().Where(hero => hero.IsAlly))
                {
                    foreach (Initiator.Initiatorinfo x in Initiator.InitiatorList)
                    {
                        if (x.Hero == hero.BaseSkinName)
                        {
                            initator.AddItem(new MenuItem(x.Spell, x.Spell, true)).SetValue(true);
                        }
                    }
                }
                config.AddSubMenu(initator);
            }
            #endregion

            #region MiscMenu
            var Miscmenu = new Menu("Misc", "Misc");
            {
                Miscmenu.AddItem(new MenuItem("BlockR", "Use Block R (no Enemy)", true).SetValue(true));
                Miscmenu.AddItem(new MenuItem("Inter-UseR", "Use Interrupt R", true).SetValue(true));
                Miscmenu.AddItem(new MenuItem("DebugMode", "Debug Mode", true).SetValue(false));

                config.AddSubMenu(Miscmenu);
            }
            #endregion

            #region DrawingMenu
            var Drawingmenu = new Menu("Drawings", "Drawings");
            {
                Drawingmenu.AddItem(new MenuItem("DrawTarget", "Draw Target", true).SetValue(true));
                Drawingmenu.AddItem(new MenuItem("DrawBall", "Draw Current Ball Position", true).SetValue(true));
                Drawingmenu.AddItem(new MenuItem("Qcircle", "Q Range", true).SetValue(new Circle(true, Color.FromArgb(100, 255, 0, 255))));
                MenuItem drawComboDamageMenu = new MenuItem("DmgDraw", "Draw Combo Damage", true).SetValue(true);
                MenuItem drawFill = new MenuItem("DmgFillDraw", "Draw Combo Damage Fill", true).SetValue(new Circle(true, Color.FromArgb(90, 255, 169, 4)));
                Drawingmenu.AddItem(drawComboDamageMenu);
                Drawingmenu.AddItem(drawFill);
                DamageIndicator.DamageToUnit = GetComboDamage;
                DamageIndicator.Enabled = drawComboDamageMenu.GetValue<bool>();
                DamageIndicator.Fill = drawFill.GetValue<Circle>().Active;
                DamageIndicator.FillColor = drawFill.GetValue<Circle>().Color;
                drawComboDamageMenu.ValueChanged +=
                    delegate(object sender, OnValueChangeEventArgs eventArgs)
                    {
                        DamageIndicator.Enabled = eventArgs.GetNewValue<bool>();
                    };
                drawFill.ValueChanged +=
                    delegate(object sender, OnValueChangeEventArgs eventArgs)
                    {
                        DamageIndicator.Fill = eventArgs.GetNewValue<Circle>().Active;
                        DamageIndicator.FillColor = eventArgs.GetNewValue<Circle>().Color;
                    };

                config.AddSubMenu(Drawingmenu);
            }
            #endregion

            #region PermaShow
            config.AddItem(new MenuItem("PermaShow", "PermaShow", true).SetShared().SetValue(true)).ValueChanged += (s, args) =>
            {
                if (args.GetNewValue<bool>())
                {
                    config.Item("ComboActive", true).Permashow(true, "Combo", SharpDX.Color.Aqua);
                    config.Item("BurstActive", true).Permashow(true, "Burst", SharpDX.Color.Aqua);
                    config.Item("HarassActive", true).Permashow(true, "Harass", SharpDX.Color.Aqua);
                    config.Item("LastHitActive", true).Permashow(true, "LastHit", SharpDX.Color.AntiqueWhite);
                    config.Item("LaneClearActive", true).Permashow(true, "LaneClear", SharpDX.Color.AntiqueWhite);
                }
                else
                {
                    config.Item("ComboActive", true).Permashow(false, "Combo");
                    config.Item("BurstActive", true).Permashow(false, "Burst");
                    config.Item("HarassActive", true).Permashow(false, "Harass");
                    config.Item("LastHitActive", true).Permashow(false, "LastHit");
                    config.Item("LaneClearActive", true).Permashow(false, "LaneClear");
                }
            };
            config.Item("ComboActive", true).Permashow(config.IsBool("PermaShow"), "Combo", SharpDX.Color.Aqua);
            config.Item("BurstActive", true).Permashow(config.IsBool("PermaShow"), "Burst", SharpDX.Color.Aqua);
            config.Item("HarassActive", true).Permashow(config.IsBool("PermaShow"), "Harass", SharpDX.Color.AntiqueWhite);
            config.Item("LastHitActive", true).Permashow(config.IsBool("PermaShow"), "LastHit", SharpDX.Color.AntiqueWhite);
            config.Item("LaneClearActive", true).Permashow(config.IsBool("PermaShow"), "LaneClear", SharpDX.Color.Aquamarine);
            #endregion

            config.AddToMainMenu();
        }
开发者ID:fgpmaia123,项目名称:KaiserSharp,代码行数:101,代码来源:Program.cs


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