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); }); }
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); }); }