本文整理汇总了C#中Menu.GetCheckBoxValue方法的典型用法代码示例。如果您正苦于以下问题:C# Menu.GetCheckBoxValue方法的具体用法?C# Menu.GetCheckBoxValue怎么用?C# Menu.GetCheckBoxValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Menu
的用法示例。
在下文中一共展示了Menu.GetCheckBoxValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Misc
static Misc()
{
Menu = MenuLoader.Menu.AddSubMenu("Misc");
Menu.AddGroupLabel("Misc settings");
Menu.AddGroupLabel("Kill Steal");
Menu.CreateCheckBox("KillSteal with Q", "Config.Misc.KillSteal.Q");
Menu.CreateCheckBox("KillSteal with R", "Config.Misc.KillSteal.R");
Menu.AddGroupLabel("Skin manager");
Menu.CreateCheckBox("Enable skin changer", "Misc.Skin.Status");
Menu.CreateSlider("Select your skin", "Misc.Skin.Id", 0, 0, 8);
Menu.AddGroupLabel("Humanizer");
Menu.CreateCheckBox("Enable humanizer", "Misc.Humanizer.Status", false);
Menu.CreateSlider("Select your delay between spells in (ms).", "Misc.Humanizer.Delay", 200, 50, 500);
Menu.CreateSlider("Additional random delay in (ms).", "Misc.Humanizer.RandomDelay", 75, 50, 100);
Menu.AddGroupLabel("Another settings");
Menu.CreateCheckBox("Enable Interrupter", "Config.Misc.Another.Interrupter");
Menu.CreateSlider("Interrupter cast delay", "Config.Misc.Another.Delay", 100, 0, 500);
Menu.CreateCheckBox("Enable auto Slow Remove", "Config.Misc.Another.Slow");
Menu.CreateSlider("Slow Remover cast delay", "Config.Misc.Another.SlowDelay", 100, 0, 500);
#region Disable / enable skin changer
if (Menu.Get<CheckBox>("Misc.Skin.Status").CurrentValue)
Player.Instance.SetSkinId(Menu.GetSliderValue("Misc.Skin.Id"));
Menu.Get<CheckBox>("Misc.Skin.Status").OnValueChange += (ValueBase<bool> sender, ValueBase<bool>.ValueChangeArgs args) =>
{
if (args.NewValue == false) Player.Instance.SetSkinId(0);
else Player.Instance.SetSkinId(Menu.GetSliderValue("Misc.Skin.Id"));
};
Menu.Get<Slider>("Misc.Skin.Id").OnValueChange += (ValueBase<int> sender, ValueBase<int>.ValueChangeArgs args) =>
{
if (Menu.GetCheckBoxValue("Misc.Skin.Status")) Player.Instance.SetSkinId(Menu.GetSliderValue("Misc.Skin.Id"));
};
#endregion
}
示例2: TryToCast
public static bool TryToCast(this Spell.Ranged spell, Obj_AI_Base target, Menu m)
{
if (target == null) return false;
return target.CanCastSpell(spell) && m.GetCheckBoxValue(spell.Slot.ToString().ToLower() + "Use") && spell.Cast(target);
}
示例3: CanCast
public static bool CanCast(this Obj_AI_Base target, Spell.SpellBase spell, Menu m)
{
if (spell == null) return false;
if (m != ComboMenu)
{
if (Player.Instance.ManaPercent < m.GetSliderValue("manaSlider")) return false;
}
return target.IsValidTarget(spell.Range) && spell.IsReady() && m.GetCheckBoxValue(spell.Slot.ToString().ToLower() + "Use");
}