Ejemplo n.º 1
0
        public static void SetManaCondition(this Spell spell, ManaMode mode, int value)
        {
            if (!ManaDictionary.ContainsKey(mode))
            {
                ManaDictionary.Add(mode, new Dictionary <SpellSlot, int>());
            }

            ManaDictionary[mode].Add(spell.Slot, value);
            var m = mode.ToString();

            if (!_menu.SubMenu(m).Items.Any())
            {
                _menu.SubMenu(m).AddBool(m + "Enabled", "Enabled in " + m);
                _menu.SubMenu(m).AddInfo(m + "Info", "-- Spells -- ", Color.AliceBlue);
            }

            var item = _menu.SubMenu(m)
                       .AddSlider(ObjectManager.Player.ChampionName + spell.Slot + "Mana", spell.Slot + " Mana Percent", value);

            item.ValueChanged +=
                delegate(object sender, OnValueChangeEventArgs args)
            {
                ManaDictionary[mode][spell.Slot] = args.GetNewValue <Slider>().Value;
            };
        }
Ejemplo n.º 2
0
        public static void SetManaCondition(this LeagueSharp.Common.Spell spell, ManaMode mode, int value)
        {
            if (!ManaDictionary.ContainsKey(mode))
            {
                ManaDictionary.Add(mode, new Dictionary <SpellSlot, int>());
            }

            ManaDictionary[mode].Add(spell.Slot, value);

            var m = mode.ToString();

            if (_menu[m + "Enabled" + spell.Slot] == null)
            {
                _menu.Add(m + "Enabled" + spell.Slot, new CheckBox("Enabled in " + m));
            }

            var item = _menu.Add(ObjectManager.Player.ChampionName + spell.Slot + "Mana" + m, new Slider(spell.Slot + " Mana Percent", value));

            _menu.AddSeparator();

            _menu[ObjectManager.Player.ChampionName + spell.Slot + "Mana" + m].Cast <Slider>().OnValueChange += delegate(ValueBase <int> sender, ValueBase <int> .ValueChangeArgs args) { ManaDictionary[mode][spell.Slot] = args.NewValue; };
        }
Ejemplo n.º 3
0
        public static void SetManaCondition(this Spell spell, ManaMode mode, int value)
        {
            if (!ManaDictionary.ContainsKey(mode))
            {
                ManaDictionary.Add(mode, new Dictionary<SpellSlot, int>());
            }

            ManaDictionary[mode].Add(spell.Slot, value);
            var m = mode.ToString();

            if (!_menu.SubMenu(m).Items.Any())
            {
                _menu.SubMenu(m).AddBool(m + "Enabled", "Enabled in " + m);
                _menu.SubMenu(m).AddInfo(m + "Info", "-- Spells -- ", Color.AliceBlue);
            }

            var item = _menu.SubMenu(m)
                .AddSlider(ObjectManager.Player.ChampionName + spell.Slot + "Mana", spell.Slot + " Mana Percent", value);
            item.ValueChanged +=
                delegate(object sender, OnValueChangeEventArgs args)
                {
                    ManaDictionary[mode][spell.Slot] = args.GetNewValue<Slider>().Value;
                };
        }
Ejemplo n.º 4
0
        public static void SetManaCondition(this LeagueSharp.Common.Spell spell, ManaMode mode, int value)
        {
            if (!ManaDictionary.ContainsKey(mode))
            {
                ManaDictionary.Add(mode, new Dictionary<SpellSlot, int>());
            }

            ManaDictionary[mode].Add(spell.Slot, value);

            var m = mode.ToString();

            if (_menu[m + "Enabled" + spell.Slot] == null)
            {
                _menu.Add(m + "Enabled" + spell.Slot, new CheckBox("Enabled in " + m));
            }

            var item = _menu.Add(ObjectManager.Player.ChampionName + spell.Slot + "Mana" + m, new Slider(spell.Slot + " Mana Percent", value));

            _menu.AddSeparator();

            _menu[ObjectManager.Player.ChampionName + spell.Slot + "Mana" + m].Cast<Slider>().OnValueChange += delegate (ValueBase<int> sender, ValueBase<int>.ValueChangeArgs args) { ManaDictionary[mode][spell.Slot] = args.NewValue; };
        }
Ejemplo n.º 5
0
 void Start()
 {
     walker = GetComponent <Walker>();
     playerAttackManager = GetComponent <PlayerAttackManager>();
     manaMode            = GetComponent <ManaMode>();
 }