示例#1
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="Bootstrap" /> class.
        /// </summary>
        public Bootstrap()
        {
            var hero = ObjectMgr.LocalHero;

            if (hero.ClassID != ClassID.CDOTA_Unit_Hero_Techies)
            {
                Variables.Instance = null;
                return;
            }

            Variables.Techies = hero;

            this.Techies = new Techies();

            foreach (var module in Variables.Modules)
            {
                module.OnLoad();
            }

            Game.OnUpdate  += this.Techies.Game_OnUpdate;
            Drawing.OnDraw += this.Techies.Drawing_OnDraw;
            Game.OnWndProc += this.Techies.Game_OnWndProc;

            PrintOnLoadMessage();
        }
示例#2
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="Bootstrap" /> class.
        /// </summary>
        public Bootstrap()
        {
            var hero = ObjectMgr.LocalHero;
            if (hero.ClassID != ClassID.CDOTA_Unit_Hero_Techies)
            {
                Variables.Instance = null;
                return;
            }

            Variables.Techies = hero;

            this.Techies = new Techies();

            foreach (var module in Variables.Modules)
            {
                module.OnLoad();
            }

            Game.OnUpdate += this.Techies.Game_OnUpdate;
            Drawing.OnDraw += this.Techies.Drawing_OnDraw;
            Game.OnWndProc += this.Techies.Game_OnWndProc;

            PrintOnLoadMessage();
        }