Example #1
0
        public Context()
        {
            LocalHero = EntityManager.LocalHero;
            RootMenu  = MenuManager.CreateRootMenu("ESExterminationV1", "ESExtermination")
                        .SetHeroImage(HeroId.npc_dota_hero_earth_spirit);

            Status = RootMenu.CreateSwitcher("On/Off");

            ComboKey     = RootMenu.CreateHoldKey("Combo key", Key.None);
            LockedTarget = RootMenu.CreateSwitcher("Locked target");

            TargetSelector            = new TargetSelector(this);
            Combo                     = new Combo(this);
            Ultimate                  = new Ultimate(this);
            SmartSpells               = new SmartSpells(this);
            AutoSave                  = new AutoSave(this);
            AutoPushInTowerDirection  = new AutoPushInTowerDirection(this);
            AutoPushInAlliesDirection = new AutoPushInAlliesDirection(this);

            Status.ValueChanged += Status_ValueChanged;
        }
Example #2
0
 private void Status_ValueChanged(MenuSwitcher switcher, Divine.Menu.EventArgs.SwitcherEventArgs e)
 {
     if (e.Value)
     {
         TargetSelector.Start();
         Combo.Start();
         SmartSpells.Start();
         AutoSave.Start();
         AutoPushInTowerDirection.Start();
         Ultimate.Start();
         AutoPushInAlliesDirection.Start();
     }
     else
     {
         TargetSelector.Dispose();
         Combo.Dispose();
         SmartSpells.Dispose();
         AutoSave.Dispose();
         AutoPushInTowerDirection.Dispose();
         Ultimate.Dispose();
         AutoPushInAlliesDirection.Dispose();
     }
 }