本文整理汇总了C#中LeagueSharp.Common.Menu.ProcStoredValueChanged方法的典型用法代码示例。如果您正苦于以下问题:C# Menu.ProcStoredValueChanged方法的具体用法?C# Menu.ProcStoredValueChanged怎么用?C# Menu.ProcStoredValueChanged使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LeagueSharp.Common.Menu
的用法示例。
在下文中一共展示了Menu.ProcStoredValueChanged方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Initialize
public static void Initialize(Menu manamanagerMenu)
{
//Only using this three, because a manamanager on Combo or None wouldn't make sense
Initialize(manamanagerMenu, Orbwalking.OrbwalkingMode.Mixed, "Harass");
Initialize(manamanagerMenu, Orbwalking.OrbwalkingMode.LaneClear);
Initialize(manamanagerMenu, Orbwalking.OrbwalkingMode.LastHit, "Lasthit (skill farm assist)");
manamanagerMenu.AddMItem("Enabled", false, (sender, args) => EnableLimitations = args.GetNewValue<bool>());
manamanagerMenu.ProcStoredValueChanged<bool>();
}
示例2: Init
public static void Init()
{
var mainMenu = new Menu("The DevAssistant", "TheDevAssistant", true);
var drawSpells = true;
var drawBuffs = true;
bool drawItems = true;
mainMenu.AddMItem("Draw Spells", false, (sender, args) => drawSpells = args.GetNewValue<bool>());
mainMenu.AddMItem("Draw Buffs", false, (sender, args) => drawBuffs = args.GetNewValue<bool>());
mainMenu.AddMItem("Draw Items", false, (sender, args) => drawItems= args.GetNewValue<bool>());
mainMenu.ProcStoredValueChanged<bool>();
mainMenu.AddToMainMenu();
Drawing.OnDraw += (args) =>
{
int i = 50;
if (drawBuffs)
{
if (TargetSelector.GetSelectedTarget().IsValidTarget())
{
foreach (var buff in TargetSelector.GetSelectedTarget().Buffs)
{
Drawing.DrawText(200, i += 20, Color.Red, buff.Name);
}
}
else
{
foreach (var buff in ObjectManager.Player.Buffs)
{
Drawing.DrawText(200, i += 20, Color.Red, buff.Name);
}
}
}
i = 50;
if (drawSpells)
foreach (var buff in ObjectManager.Player.Spellbook.Spells)
{
Drawing.DrawText(600, i += 20, Color.Red, buff.Name+" / "+buff.Ammo+" / "+buff.Level+" / ");
}
i = 50;
if (drawItems)
foreach (var buff in ObjectManager.Player.InventoryItems)
{
Drawing.DrawText(1000, i += 20, Color.Red, buff.Id+" / "+buff.IData.DisplayName+" / "+buff.IData.SpellName+" / "+buff.IData.EffectAmount[1]+" / ");
}
};
}
示例3: Initialize
public void Initialize(Menu menu, ItemManager itemManager)
{
menu.AddMItem("Use on enemy ults", true, (sender, args) => UseOnUltimates = args.GetNewValue<bool>());
menu.AddMItem("Use when health % < ", new Slider(40), (sender, args) => MinHealth = args.GetNewValue<Slider>().Value);
menu.ProcStoredValueChanged<bool>();
menu.ProcStoredValueChanged<Slider>();
Spellbook.OnCastSpell += (sender, args) =>
{
if (itemManager.IsTickingNow(this) && sender.Owner.IsEnemy && sender.Owner.Type == GameObjectType.obj_AI_Hero && args.Slot == SpellSlot.R && UseOnUltimates)
{
if (args.Target != null && args.Target.IsValid && args.Target.IsMe)
{
Use(sender.Owner.Target as Obj_AI_Base);
return;
}
var halfLineLength = (args.EndPosition - args.StartPosition).Length()/2f;
if (ObjectManager.Player.Position.Distance(args.StartPosition) > halfLineLength && ObjectManager.Player.Position.Distance(args.EndPosition) > halfLineLength) return;
Use(sender.Owner.Target as Obj_AI_Base);
}
};
}
示例4: Initialize
public void Initialize(Menu menu)
{
menu.AddMItem("Min duration in ms", new Slider(1000, 0, 3000), (sender, args) => _minDuration = args.GetNewValue<Slider>());
menu.AddMItem("1000 ms = 1 sec");
var typeMenu = menu.CreateSubmenu("Use on");
typeMenu.AddMItem("Blind", false, (sender, args) => _blind = args.GetNewValue<bool>());
typeMenu.AddMItem("Silence", false, (sender, args) => _silence = args.GetNewValue<bool>());
typeMenu.AddMItem("Stun", true, (sender, args) => _stun = args.GetNewValue<bool>());
typeMenu.AddMItem("Fear", true, (sender, args) => _fear = args.GetNewValue<bool>());
typeMenu.AddMItem("Snare", true, (sender, args) => _snare = args.GetNewValue<bool>());
typeMenu.AddMItem("Polymorph", true, (sender, args) => _polymorph = args.GetNewValue<bool>());
typeMenu.AddMItem("Charm", true, (sender, args) => _charm = args.GetNewValue<bool>());
typeMenu.AddMItem("Sleep", true, (sender, args) => _sleep = args.GetNewValue<bool>());
typeMenu.AddMItem("Taunt", true, (sender, args) => _taunt = args.GetNewValue<bool>());
var miscMenu = menu.CreateSubmenu("Misc");
miscMenu.AddMItem("Don't use on Alistar W (is a stun)", true, (sender, args) => _noAliW = args.GetNewValue<bool>());
miscMenu.AddMItem("Use on killable Ignite", true, (sender, args) => _ignite = args.GetNewValue<bool>());
miscMenu.AddMItem("Use on Exhaust", true, (sender, args) => _exhaust = args.GetNewValue<bool>());
menu.ProcStoredValueChanged<bool>();
typeMenu.ProcStoredValueChanged<bool>();
miscMenu.ProcStoredValueChanged<bool>();
menu.ProcStoredValueChanged<Slider>();
}
示例5: Init
public static void Init()
{
var mainMenu = new Menu("The DevAssistant", "TheDevAssistant", true);
var drawSpells = true;
var drawBuffs = true;
mainMenu.AddMItem("Draw Spells", true, (sender, args) => drawSpells = args.GetNewValue<bool>());
mainMenu.AddMItem("Draw Buffs", true, (sender, args) => drawBuffs = args.GetNewValue<bool>());
mainMenu.ProcStoredValueChanged<bool>();
mainMenu.AddToMainMenu();
Drawing.OnDraw += (args) =>
{
int i = 50;
if (drawBuffs)
{
if (TargetSelector.GetSelectedTarget().IsValidTarget())
{
foreach (var buff in TargetSelector.GetSelectedTarget().Buffs)
{
Drawing.DrawText(200, i += 20, Color.Red, buff.Name);
}
}
else
{
foreach (var buff in ObjectManager.Player.Buffs)
{
Drawing.DrawText(200, i += 20, Color.Red, buff.Name);
}
}
}
i = 50;
if (drawSpells)
foreach (var buff in ObjectManager.Player.Spellbook.Spells)
{
Drawing.DrawText(600, i += 20, Color.Red, buff.Name);
}
};
}
示例6: Initialize
public void Initialize(Menu menu)
{
for (int i = 0; i < _healthStates.Length; i++)
_healthStates[i] = ObjectManager.Player.HealthPercent;
menu.AddMItem("Use when:");
menu.AddMItem("Health below %", new Slider(15, 1, 35), (sender, args) => _minHealth = args.GetNewValue<Slider>());
menu.AddMItem("Health % gone in < 1 sec", new Slider(60), (sender, args) => _burstHealth = args.GetNewValue<Slider>());
if (HeroManager.Allies.Any(ally => ally.NetworkId != ObjectManager.Player.NetworkId))
{
var allies = menu.CreateSubmenu("Save allies");
allies.AddMItem("When health below %", new Slider(15, 1, 35), (sender, args) => _allyHealth = args.GetNewValue<Slider>());
allies.AddMItem("And enemy distance <", new Slider(1500, 500, 2500), (sender, args) => _enemyDistance = args.GetNewValue<Slider>());
HeroManager.Allies.Where(ally => ally.NetworkId != ObjectManager.Player.NetworkId).ToList().ForEach(ally => allies.AddMItem("Save " + ally.ChampionName, true, (sender, args) => _saveAllies[ally.ChampionName] = args.GetNewValue<bool>()));
allies.ProcStoredValueChanged<bool>();
allies.ProcStoredValueChanged<Slider>();
}
menu.ProcStoredValueChanged<Slider>();
Game.OnUpdate += (eArgs) =>
{
if (_lastHealthState + 0.1f < Game.Time)
{
_lastHealthState = Game.Time;
_healthStates[(int)((Game.Time * 10) % 10)] = ObjectManager.Player.HealthPercent;
}
};
//Drawing.OnDraw += (args) =>
//{
// for (int i = 0; i < _healthStates.Length; i++)
// {
// Drawing.DrawText(800, 200 + i * 20, Color.Blue, _healthStates[i].ToString());
// }
//};
}
示例7: Initialize
public void Initialize(Menu menu)
{
menu.AddMItem("After attack", true, (sender, args) => _afterAttack = args.GetNewValue<bool>());
menu.ProcStoredValueChanged<bool>();
Orbwalking.AfterAttack += (sender, args) => _justAttacked = true;
}
示例8: Initialize
public void Initialize(Menu menu)
{
menu.AddMItem("Player max HP %", new Slider(80), (sender, args) => _maxPlayerHealth = args.GetNewValue<Slider>().Value);
menu.AddMItem("Enemy min HP %", new Slider(20), (sender, args) => _minEnemyHealth = args.GetNewValue<Slider>().Value);
menu.ProcStoredValueChanged<Slider>();
}