本文整理汇总了C#中LeagueSharp.Common.Menu.AddMenu方法的典型用法代码示例。如果您正苦于以下问题:C# Menu.AddMenu方法的具体用法?C# Menu.AddMenu怎么用?C# Menu.AddMenu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LeagueSharp.Common.Menu
的用法示例。
在下文中一共展示了Menu.AddMenu方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Harass
static Harass()
{
#region Menu
var harass = new Menu(Name + " Settings", Name);
var harassQ = harass.AddMenu("Q", "Q");
harassQ.AddBool("HarassQ", "Use Q");
harassQ.AddSlider("HarassQMana", "Min Mana %", 40);
var harassW = harass.AddMenu("W", "W");
harassW.AddBool("HarassW", "Use W");
harassW.AddBool("HarassW2", "Use Second W");
harassW.AddList("HarassW2Mode", "Second W Setting", new[] { "Auto", "After E" });
harassW.AddSlider("HarassWMana", "Min Mana %", 40);
var harassE = harass.AddMenu("E", "E");
harassE.AddBool("HarassE", "Use E");
harassE.AddHitChance("HarassEHC", "Min HitChance", HitChance.Medium);
harassE.AddSlider("HarassEMana", "Min Mana %", 40);
// harass.AddItem(new MenuItem("HarassCombo", "W->Q->E->W Combo").SetValue(true));
/* var harassR = harass.AddSubMenu(new Menu("R", "R"));
harassR.AddItem(new MenuItem("HarassR", "Use R").SetValue(true));
*/
harass.AddKeyBind("HarassKey", "Harass Key", (byte) 'C');
#endregion
LocalMenu = harass;
Game.OnUpdate += Game_OnGameUpdate;
}
示例2: LaneClear
static LaneClear()
{
#region Menu
var laneclear = new Menu("Farm Settings", "LaneClear");
var lcQ = laneclear.AddMenu("Q", "Q");
lcQ.AddBool("LaneClearQ", "Use Q");
lcQ.AddSlider("LaneClearQMana", "Minimum Q Mana Percent", 30);
var lcW = laneclear.AddMenu("W", "W");
lcW.AddBool("LaneClearW", "Use W");
lcW.AddBool("LaneClearRW", "Use RW");
lcW.AddSlider("LaneClearWHits", "Min Enemies Hit", 2, 0, 5);
lcW.AddSlider("LaneClearWMana", "Minimum W Mana Percent", 30);
laneclear.AddKeyBind("LaneClearKey", "Farm Key", (byte) 'V');
#endregion
LocalMenu = laneclear;
Game.OnUpdate += Game_OnGameUpdate;
}
示例3: Game_OnGameLoad
private static void Game_OnGameLoad(EventArgs args)
{
Menu = new Menu("PredictionTester", "PredictionTester", true);
var spellMenu = Menu.AddMenu("Spells", "Spells");
Console.WriteLine("TEST");
var drawMenu = Menu.AddMenu("Draw", "Draw");
drawMenu.AddCircle("VeryHigh", "Very High HitChance", Color.Red);
drawMenu.AddCircle("High", "High HitChance", Color.Yellow);
drawMenu.AddCircle("Medium", "Medium HitChance", Color.Green);
drawMenu.AddCircle("Low", "Low HitChance", Color.Blue);
drawMenu.AddSlider("Radius", "Circle Radius", 50, 50, 200);
foreach (var entry in
SpellDatabase.Spells.Where(
spell => spell.BaseSkinName.Equals(ObjectManager.Player.CharData.BaseSkinName)))
{
PlayerSpellData.Add(entry);
}
foreach (var spell in
ObjectManager.Player.Spellbook.Spells.Where(
spell => SkillshotTypes.ContainsKey(spell.SData.TargettingType)))
{
var spellData = PlayerSpellData.FirstOrDefault(s => s.Slot.Equals(spell.Slot));
if (spellData == null)
{
continue;
}
var spellSlot = spell.Slot.ToString();
var predictedSpell = new Spell(spell.Slot, spellData.Range);
predictedSpell.SetSkillshot(
spellData.Delay, spellData.Radius, spellData.MissileSpeed, false,
SkillshotTypes[spell.SData.TargettingType]);
SpellList.Add(predictedSpell);
var menu = spellMenu.AddSubMenu(new Menu(spellSlot, spellSlot));
menu.AddBool(spellSlot + "Predict", "Prediction");
menu.AddBool(spellSlot + "Old", "Old Prediction");
menu.AddBool(spellSlot + "Best", "Best Prediction");
menu.AddBool(spellSlot + "Decent", "Decent Prediction");
menu.AddHitChance(spellSlot + "HitChance", "MinHitChance", HitChance.Medium);
}
Console.WriteLine("TEST2");
Menu.AddToMainMenu();
Game.OnUpdate += Game_OnUpdate;
}
示例4: Initialize
public static void Initialize(Menu config, string checkUrl, string newsUrl = "")
{
MenuConfig = config;
CheckUrl = checkUrl;
NewsUrl = newsUrl;
if (config.SubMenu("Credits") != null)
{
var Menu = config.SubMenu("Credits");
Menu.AddSeparator();
Menu.AddBool("檢查版本", "檢查版本", true);
Menu.AddBool("消息", "提示消息", true);
}
else
{
var Menu = config.AddMenu("Credits", "腳本訊息");
Menu.AddLabel("作者:TwCn");
Menu.AddLabel("如果你喜歡這個脚本,記得在數據庫中點綠色讚");
Menu.AddSeparator();
Menu.AddBool("檢查版本", "檢查版本", true);
Menu.AddBool("消息", "提示消息", true);
}
CustomEvents.Game.OnGameLoad += Game_OnGameLoad;
}
示例5: Combo
static Combo()
{
#region Menu
var combo = new Menu(Name + " Settings", Name);
var comboQ = combo.AddMenu("Q", "Q");
comboQ.AddBool("ComboQ", "Use Q");
var comboW = combo.AddMenu("W", "W");
comboW.AddBool("ComboW", "Use W");
comboW.AddObject("Spacer", "Set to 0% To Always W");
comboW.AddSlider("ComboWMinHP", "Min HP To Use W", 20);
comboW.AddBool("ComboW2", "Use Second W");
comboW.AddBool("ComboW2Spells", "Use After Spells on CD");
var comboE = combo.AddMenu("E", "E");
comboE.AddBool("ComboE", "Use E");
comboE.AddBool("ComboEStart", "Start Combo with E", false);
comboE.AddHitChance("ComboEHC", "Min HitChance", HitChance.Medium);
var comboR = combo.AddMenu("R", "R");
comboR.AddBool("ComboR", "Use R");
comboR.AddList(
"ComboRMode", "Ult Mode",
new[] { SpellSlot.Q.ToString(), SpellSlot.W.ToString(), SpellSlot.E.ToString() });
/* var wCombo = combo.AddMenu("AOE Combo", "AOECombo");
wCombo.AddBool("wComboEnabled", "Enabled");
wCombo.AddBool("wComboFlash", "Use Flash");
wCombo.AddSlider("wComboEnemies", "Min Enemies", 2, 1, 5);
*/
combo.AddBool("ComboItems", "Use Items");
combo.AddKeyBind("ComboKey", "Combo Key", 32);
#endregion
LocalMenu = combo;
GameObject.OnCreate += GameObject_OnCreate;
GameObject.OnDelete += GameObject_OnDelete;
Game.OnUpdate += Game_OnGameUpdate;
}
示例6: Flee
static Flee()
{
#region Menu
var flee = new Menu(Name + " Settings", Name);
var fleeW = flee.AddMenu("W", "W");
fleeW.AddBool("FleeW", "Use W");
var fleeE = flee.AddMenu("E", "E");
fleeE.AddBool("FleeE", "Use E");
fleeE.AddHitChance("FleeEHC", "Min HitChance", HitChance.Medium);
var fleeR = flee.AddMenu("R", "R");
fleeR.AddBool("FleeRW", "Use W Ult");
flee.AddKeyBind("FleeKey", "Flee Key", (byte) 'T');
#endregion
LocalMenu = flee;
Game.OnUpdate += Game_OnGameUpdate;
}
示例7: Initialize
public static void Initialize(Menu menu)
{
_menu = menu.AddMenu("Passive", "Passive");
_menu.AddInfo("CloneInfo", " --> Automatic movement of clone.", Color.Red);
_menu.AddBool("CloneEnabled", "Control Clone");
_menu.AddList("CloneMode", "Mode", new[] { "To Player", "To Target", "Away from Player" });
_menu.AddBool("CloneOverride", "Manual Override");
_menu.Item("CloneOverride").SetTooltip("If clone is manually moved stop automatically moving.");
Obj_AI_Base.OnIssueOrder += Obj_AI_Base_OnIssueOrder;
Game.OnUpdate += Game_OnGameUpdate;
GameObject.OnCreate += GameObject_OnCreate;
GameObject.OnDelete += GameObject_OnDelete;
}
示例8: Initialize
public static void Initialize(Menu config, Spell[] initLvSq = default(Spell[]))
{
Config = config;
var menu = config.AddMenu("自动加点", "自动加点");
menu.AddBool("启用", "启用", true);
menu.AddStringList("最主", "最主", new[] { "Q", "W", "E", "R" }, initLvSq == default(Spell[]) ? 3: GetIndexFormSpell(initLvSq[0]));
menu.AddStringList("优先", "优先", new[] { "Q", "W", "E", "R" }, initLvSq == default(Spell[]) ? 1 : GetIndexFormSpell(initLvSq[1]));
menu.AddStringList("其次", "其次", new[] { "Q", "W", "E", "R" }, initLvSq == default(Spell[]) ? 1 : GetIndexFormSpell(initLvSq[2]));
menu.AddStringList("最后", "最后", new[] { "Q", "W", "E", "R" }, initLvSq == default(Spell[]) ? 1 : GetIndexFormSpell(initLvSq[3]));
menu.AddSlider("升级等级", "升级等级",2,6,1);
menu.AddSlider("加点延迟", "加点延迟", 700,0,1000);
Obj_AI_Base.OnLevelUp += Obj_AI_Base_OnLevelUp;
}
示例9: Initialize
/// <summary>
/// Initializes static members of the <see cref="CustomInterrupter" /> class.
/// </summary>
public static void Initialize(Menu menu)
{
_menu = menu.AddMenu("CustomInterrupter", "Interrupter");
_menu.SetFontStyle(FontStyle.Regular, Color.OrangeRed.ToSharpDXColor());
// Initialize Properties
InterruptableSpells = new Dictionary<string, List<InterruptableSpell>>();
CastingInterruptableSpell = new Dictionary<int, InterruptableSpell>();
InitializeSpells();
// Trigger LastCastedSpell
ObjectManager.Player.LastCastedspell();
// Listen to required events
Game.OnUpdate += Game_OnGameUpdate;
Obj_AI_Base.OnProcessSpellCast += Obj_AI_Base_OnProcessSpellCast;
Spellbook.OnStopCast += Spellbook_OnStopCast;
}
示例10: Sivir
public Sivir()
{
Q.Range = 1220;
Q.SetSkillshot(0.25f, 90f, 1350f, false, SkillshotType.SkillshotLine);
W.Range = 593;
Menu = new Menu("EatShitSivir", "EatShitSivir", true);
Orbwalker = Menu.AddOrbwalker();
Menu.AddSpell(
SpellSlot.Q,
new List<Orbwalking.OrbwalkingMode>
{
Orbwalking.OrbwalkingMode.Combo,
Orbwalking.OrbwalkingMode.Mixed,
Orbwalking.OrbwalkingMode.LaneClear,
Orbwalking.OrbwalkingMode.LastHit
});
var w = Menu.AddSpell(
SpellSlot.W,
new List<Orbwalking.OrbwalkingMode>
{
Orbwalking.OrbwalkingMode.Combo,
Orbwalking.OrbwalkingMode.Mixed,
Orbwalking.OrbwalkingMode.LaneClear
});
w.AddSlider("MinMinionsW", "Min Minions to W", 1, 5);
w.AddBool("TurretW", "Use on Turret");
w.AddBool("InhibitorW", "Use on Inhibitor");
w.AddBool("NexusW", "Use on Nexus");
var e = Menu.AddMenu("E", "E");
e.AddBool("AutoE", "Smart E");
e.AddBool("EatShit", "Eat Shit");
e.Item("EatShit").SetTooltip("Disable evade scripts in order to cast E and eat a spell.");
e.AddSlider("EatShitMana", "Min Mana to Eat Shit", 100);
Menu.AddToMainMenu();
}
示例11: Game_OnGameLoad
private static void Game_OnGameLoad(EventArgs args)
{
if (!Player.IsChampion("Illaoi"))
{
return;
}
Bootstrap.Initialize();
Menu = new Menu("TentacleBabeIllaoi", "TentacleBabeIllaoi", true);
Menu.SetFontStyle(FontStyle.Regular, ScriptColor);
Orbwalker = Menu.AddOrbwalker();
var spells = Menu.AddMenu("Spells", "Spells");
var q = spells.AddMenu("Q", "Q");
q.AddBool("QCombo", "Use in Combo");
q.AddBool("QHarass", "Use in Harass");
var w = spells.AddMenu("W", "W");
w.AddBool("WCombo", "Use in Combo");
w.AddBool("WHarass", "Use in Harass");
var e = spells.AddMenu("E", "E");
e.AddBool("ECombo", "Use in Combo");
e.AddBool("EHarass", "Use in Harass");
var r = spells.AddMenu("R", "R");
r.AddBool("RCombo", "Use in Combo");
r.AddBool("RHarass", "Use in Harass");
Menu.AddToMainMenu();
TentacleManager.Initialize();
Obj_AI_Base.OnProcessSpellCast += Obj_AI_Base_OnProcessSpellCast;
Game.OnUpdate += Game_OnUpdate;
Orbwalking.AfterAttack += Orbwalking_AfterAttack;
}
示例12: Initialize
public static void Initialize(Menu config,string checkUrl,string newsUrl = "") {
MenuConfig = config;
CheckUrl = checkUrl;
NewsUrl = newsUrl;
if (config.SubMenu("Credits")!=null)
{
var Menu = config.SubMenu("Credits");
Menu.AddSeparator();
Menu.AddBool("检查版本", "检查版本",true);
Menu.AddBool("新闻", "提示新闻", true);
}
else
{
var Menu = config.AddMenu("Credits", "脚本信息");
Menu.AddLabel("作者:晴依");
Menu.AddLabel("如果你喜欢这个脚本,记得在脚本库中点赞!");
Menu.AddSeparator();
Menu.AddBool("检查版本", "检查版本", true);
Menu.AddBool("新闻", "提示新闻", true);
}
CustomEvents.Game.OnGameLoad += Game_OnGameLoad;
}
示例13: 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!");
}
示例14: Initialize
public static void Initialize(Menu menu)
{
var enemies = HeroManager.Enemies;
if (enemies.Any(o => o.ChampionName.Equals("Kalista")))
{
menu.AddBool("Oathsworn", "Block Oathsworn Knockup (Kalista R)");
}
foreach (var unit in
enemies)
{
if (!BlockedSpells.ContainsKey(unit.ChampionName))
{
continue;
}
var name = unit.ChampionName.Equals("MonkeyKing") ? "Wukong" : unit.ChampionName;
var blockedMenu = menu.AddMenu(unit.ChampionName, name);
foreach (var spell in BlockedSpells[unit.ChampionName])
{
var slot = spell.Slot.Equals(48) ? SpellSlot.R : spell.Slot;
blockedMenu.AddBool(unit.ChampionName + spell.MenuName, spell.DisplayName);
}
}
Game.OnUpdate += Game_OnUpdate;
Menu = menu;
}
示例15: Initialize
/// <summary>
/// Initializes static members of the <see cref="AntiGapcloser" /> class.
/// </summary>
public static void Initialize(Menu menu)
{
_menu = menu.AddMenu("CustomAntiGapcloser", "AntiGapcloser");
_menu.SetFontStyle(FontStyle.Regular, Color.OrangeRed.ToSharpDXColor());
#region Aatrox
Spells.Add(
new Gapcloser
{
ChampionName = "Aatrox",
Slot = SpellSlot.Q,
SpellName = "aatroxq",
SkillType = GapcloserType.Skillshot
});
#endregion
#region Akali
Spells.Add(
new Gapcloser
{
ChampionName = "Akali",
Slot = SpellSlot.R,
SpellName = "akalishadowdance",
SkillType = GapcloserType.Targeted
});
#endregion
#region Alistar
Spells.Add(
new Gapcloser
{
ChampionName = "Alistar",
Slot = SpellSlot.W,
SpellName = "headbutt",
SkillType = GapcloserType.Targeted
});
#endregion
#region Corki
Spells.Add(
new Gapcloser
{
ChampionName = "Corki",
Slot = SpellSlot.W,
SpellName = "carpetbomb",
SkillType = GapcloserType.Skillshot
});
#endregion
#region Diana
Spells.Add(
new Gapcloser
{
ChampionName = "Diana",
Slot = SpellSlot.R,
SpellName = "dianateleport",
SkillType = GapcloserType.Targeted
});
#endregion
#region Ekko
Spells.Add(
new Gapcloser
{
ChampionName = "Ekko",
Slot = SpellSlot.E,
SpellName = "ekkoe",
SkillType = GapcloserType.Skillshot
});
Spells.Add(
new Gapcloser
{
ChampionName = "Ekko",
Slot = SpellSlot.E,
SpellName = "ekkoeattack",
SkillType = GapcloserType.Targeted
});
#endregion
#region Elise
Spells.Add(
new Gapcloser
{
//.........这里部分代码省略.........