Esempio n. 1
0
        public override void Initialize()
        {
            GameHooks.LoadContent                 += GameHooks_LoadContent;
            GameHooks.Update                      += TerrariaHooks_Update;
            PlayerHooks.UpdatePhysics             += PlayerHooks_UpdatePhysics;
            DrawHooks.DrawInterface               += DrawHooks_DrawInterface;
            DrawHooks.RealDrawAfterScreenPosition += DrawHooks_RealDrawAfterScreenPosition;

            ThreadPool.QueueUserWorkItem(state =>
            {
                string path     = Path.Combine(Program.PluginSettingsPath, SettingsFilename);
                trainerSettings = SettingsHelper.Load <TrainerSettings>(path);
                defaultSettings = new TrainerSettings();
                trainerForm     = new TrainerForm(trainerSettings);
            });
        }
Esempio n. 2
0
        public override void Initialize()
        {
            GameHooks.LoadContent += GameHooks_LoadContent;
            GameHooks.Update += TerrariaHooks_Update;
            PlayerHooks.UpdatePhysics += PlayerHooks_UpdatePhysics;
            DrawHooks.DrawInterface += DrawHooks_DrawInterface;
            DrawHooks.RealDrawAfterScreenPosition += DrawHooks_RealDrawAfterScreenPosition;

            ThreadPool.QueueUserWorkItem(state =>
            {
                string path = Path.Combine(Program.PluginSettingsPath, SettingsFilename);
                trainerSettings = SettingsHelper.Load<TrainerSettings>(path);
                defaultSettings = new TrainerSettings();
                trainerForm = new TrainerForm(trainerSettings);
            });
        }