本文整理汇总了C#中SpellSlot.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# SpellSlot.ToString方法的具体用法?C# SpellSlot.ToString怎么用?C# SpellSlot.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SpellSlot
的用法示例。
在下文中一共展示了SpellSlot.ToString方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsSpellActive
/// <summary>
/// The is the spell active method.
/// </summary>
/// <param name="spellSlot">
/// The spell slot.
/// </param>
/// <param name="orbwalkingMode">
/// The orbwalking mode.
/// </param>
/// <returns>
/// <see cref="bool" />
/// </returns>
private static bool IsSpellActive(SpellSlot spellSlot, Orbwalking.OrbwalkingMode orbwalkingMode)
{
if (Program.Orbwalker.ActiveMode != orbwalkingMode || !spellSlot.IsReady())
{
return false;
}
try
{
var orbwalkerModeLower = Program.Orbwalker.ActiveMode.ToString().ToLower();
var spellSlotNameLower = spellSlot.ToString().ToLower();
return MyMenu.RootMenu.Item(orbwalkerModeLower + spellSlotNameLower + "use").GetValue<bool>()
&& MyMenu.RootMenu.Item(orbwalkerModeLower + spellSlotNameLower + "mana")
.GetValue<Slider>()
.Value <= ObjectManager.Player.ManaPercent;
}
catch (Exception e)
{
Logging.AddEntry(
LoggingEntryTrype.Error,
"@SpellManager.cs: Can not get spell active state for slot {0} - {1}",
spellSlot.ToString(),
e);
throw;
}
}
示例2: AddSkill
public static MenuItem AddSkill(this Menu mainMenu, SpellSlot slot, Orbwalking.OrbwalkingMode Mode, bool defaultValue = true, int defMana = 20, bool addMM = true)
{
if (addMM)
{
mainMenu.AddManaManager(slot, Mode, defMana);
}
return mainMenu.AddBool($"iseriesr.{ObjectManager.Player.ChampionName.ToLower()}.{Mode.ToString().ToLower()}.{slot.ToString().ToLower()}", $"Use {slot}", defaultValue);
}
示例3: AddManaManager
public static MenuItem AddManaManager(this Menu mainMenu, SpellSlot slot, Orbwalking.OrbwalkingMode Mode, int defMana = 0)
{
var mmMenu =
mainMenu.Children.FirstOrDefault(
m =>
m.Name.ToLower().Contains(
$"iseriesr.{ObjectManager.Player.ChampionName.ToLower()}.{Mode.ToString().ToLower()}.mm"));
if (mmMenu == null)
{
mmMenu = mainMenu.AddManaManagerMenu(Mode);
}
return mmMenu.AddSlider(
$"iseriesr.{ObjectManager.Player.ChampionName.ToLower()}.{Mode.ToString().ToLower()}.mm.{slot.ToString().ToLower()}",
$"{slot} Mana {Mode}", defMana, 0, 100);
}
示例4: GenerateSpellMenu
/// <summary>
/// The generate spell menu method.
/// </summary>
/// <param name="spellSlot">
/// The spell slot.
/// </param>
internal static void GenerateSpellMenu(SpellSlot spellSlot)
{
try
{
var spellSlotName = spellSlot.ToString();
var spellSlotNameLower = spellSlotName.ToLower();
var node = new Menu(spellSlot + " Settings", "spellmenu" + spellSlotNameLower);
var nodeCombo = new Menu("Combo", spellSlotNameLower + "combomenu");
nodeCombo.AddItem(
new MenuItem("combo" + spellSlotNameLower + "use", "Use " + spellSlotName).SetValue(true));
nodeCombo.AddItem(
new MenuItem("combo" + spellSlotNameLower + "mana", "Min. Mana").SetValue(new Slider(5)));
node.AddSubMenu(nodeCombo);
var nodeMixed = new Menu("Mixed", spellSlotNameLower + "mixedmenu");
nodeMixed.AddItem(
new MenuItem("mixed" + spellSlotNameLower + "use", "Use " + spellSlotName).SetValue(true));
nodeMixed.AddItem(
new MenuItem("mixed" + spellSlotNameLower + "mana", "Min. Mana").SetValue(new Slider(50)));
node.AddSubMenu(nodeMixed);
var nodeLastHit = new Menu("LastHit", spellSlotNameLower + "lasthitmenu");
nodeLastHit.AddItem(
new MenuItem("lasthit" + spellSlotNameLower + "use", "Use " + spellSlotName).SetValue(true));
nodeLastHit.AddItem(
new MenuItem("lasthit" + spellSlotNameLower + "mana", "Min. Mana").SetValue(new Slider(50)));
node.AddSubMenu(nodeLastHit);
var nodeLaneClear = new Menu("LaneClear", spellSlotNameLower + "laneclearmenu");
nodeLaneClear.AddItem(
new MenuItem("laneclear" + spellSlotNameLower + "use", "Use " + spellSlotName).SetValue(true));
nodeLaneClear.AddItem(
new MenuItem("laneclear" + spellSlotNameLower + "mana", "Min. Mana").SetValue(new Slider(50)));
node.AddSubMenu(nodeLaneClear);
RootMenu.AddSubMenu(node);
}
catch (Exception e)
{
Logging.AddEntry(LoggingEntryTrype.Error, "@MyMenu.cs: Can not generate menu for spell - {0}", e);
throw;
}
}
示例5: AddSpell
public static Menu AddSpell(this Menu menu, SpellSlot spell, List<Orbwalking.OrbwalkingMode> modes)
{
var spellMenu = menu.AddMenu(spell.ToString(), spell.ToString());
foreach (var mode in modes)
{
spellMenu.AddBool(mode.GetModeString() + spell, "Use in " + mode.GetModeString());
}
return spellMenu;
}
示例6: HitChancePercent
private static float HitChancePercent(SpellSlot s)
{
var slot = s.ToString().Trim();
return IsHarass
? SubMenu["Prediction"][slot + "Harass"].Cast<Slider>().CurrentValue
: SubMenu["Prediction"][slot + "Combo"].Cast<Slider>().CurrentValue;
}
示例7: GetStringFromSpellSlot
public static String GetStringFromSpellSlot(SpellSlot sp)
{
return sp.ToString();
}
示例8: DrawDamageOnHealthbar
private static void DrawDamageOnHealthbar(Obj_AI_Hero healthbar, double damage, ref double playerHealthPercent, double prevPlayerHealthPercent, ref bool shouldDrawLine, Color spellColor, bool drawtext = false, SpellSlot slot = SpellSlot.Unknown)
{
DrawDamageOnHealthbar(healthbar, damage, ref playerHealthPercent, prevPlayerHealthPercent, ref shouldDrawLine, spellColor, slot.ToString(), drawtext, slot);
}
示例9: DrawSpell
private void DrawSpell(AIHeroClient hero, SpellSlot slot)
{
var spell = hero.Spellbook.GetSpell(slot);
var color = Color.Cyan;
var cooldown = spell.CooldownExpires - Game.Time;
var location = this.GetSpellLocation(hero, slot);
var str = slot.ToString();
if (!spell.IsLearned)
{
str = "?";
color = Color.White;
}
else if (hero.Mana < spell.SData.Mana)
{
str = "M";
color = Color.Red;
}
else if (cooldown > 0)
{
str = ((int)Math.Ceiling(cooldown)).ToString();
color = Color.Orange;
}
this.text.Draw(string.Format("{0,3}", str), color, (int)location.X, (int)location.Y);
}