Beispiel #1
0
 public override void Load()
 {
     Reflection.InitializeCaches();
     FallingTileTextures  = new Dictionary <int, Texture2D>();
     fallingTileAlphaMask = GetTexture("GameHelpers/FallingTileAlphaMask");
     disposeList          = new List <IDisposable>();
     DustEmitters         = new List <DustEmitter>();
     StackInspectHandler.Initialize();
 }
Beispiel #2
0
 public override void Load()
 {
     Reflection.InitializeCaches();
     FallingTileTextures  = new Dictionary <int, Texture2D>();
     fallingTileAlphaMask = GetTexture("GameHelpers/FallingTileAlphaMask");
     disposeList          = new List <IDisposable>();
     ModAssemblies        = ModLoader.Mods.Skip(1).ToDictionary(m => m.Name, m => m.Code);      // initialize on load so libvaxy-dependent mods function when using this
     StackInspectHandler.Initialize();
     HookHandler.ApplyHooks();
 }
Beispiel #3
0
        public override void Unload()
        {
            instance = null;

            Reflection.UnloadCaches();

            FallingTileTextures  = null;
            fallingTileAlphaMask = null;

            foreach (IDisposable disposable in disposeList)
            {
                disposable.Dispose();
            }
            disposeList = null;

            TerrariaAssembly = null;
            ModAssemblies    = null;

            StackInspectHandler.Unload();
        }
Beispiel #4
0
 public static void InspectStack(StackInspectTarget target)
 => StackInspectHandler.ApplyStackInspection(target);