コード例 #1
0
        public Config(ZeusPlus main)
        {
            Main   = main;
            Screen = new Vector2(Drawing.Width - 160, Drawing.Height);

            Menu              = new MenuManager(this);
            UpdateMode        = new UpdateMode(this);
            LinkenBreaker     = new LinkenBreaker(this);
            DamageCalculation = new DamageCalculation(this);
            AutoKillSteal     = new AutoKillSteal(this);
            TeleportBreaker   = new TeleportBreaker(this);
            FarmMode          = new FarmMode(this, main.Context);
            Main.Context.Orbwalker.RegisterMode(FarmMode);

            Menu.ComboKeyItem.Item.ValueChanged += ComboKeyChanged;
            var ModeKey = KeyInterop.KeyFromVirtualKey((int)Menu.ComboKeyItem.Value.Key);

            Mode = new Mode(Main.Context, ModeKey, this);
            Main.Context.Orbwalker.RegisterMode(Mode);

            Renderer = new Renderer(this);
        }
コード例 #2
0
        protected virtual void Dispose(bool disposing)
        {
            if (Disposed)
            {
                return;
            }

            if (disposing)
            {
                Renderer.Dispose();
                Main.Context.Orbwalker.UnregisterMode(Mode);
                Menu.ComboKeyItem.Item.ValueChanged -= ComboKeyChanged;
                Main.Context.Orbwalker.UnregisterMode(FarmMode);
                TeleportBreaker.Dispose();
                AutoKillSteal.Dispose();
                DamageCalculation.Dispose();
                UpdateMode.Dispose();
                Main.Context.Particle.Dispose();
                Menu.Dispose();
            }

            Disposed = true;
        }