public override void Unload() { Unloading = true; try { Main.OnPostDraw -= Main_OnPostDraw; Main.OnPreDraw -= Main_OnPreDraw; ModTexturesTable.Clear(); PassHotkey = null; WashHotkey = null; HookCursorHotKey = null; IsCalamityLoaded = false; ModHandler.parser = null; ModHandler.delegates = new Dictionary <string, Dictionary <string, Func <bool> > >(); } catch (Exception e) { throw e; } finally { Instance = null; GC.Collect(); } base.Unload(); }
public Entrogic() { Instance = this; Directory.CreateDirectory(ModFolder); }