コード例 #1
0
        public override void Load()
        {
            Hotkeys.Load();
            Core.Load();
            FastForwardBoost.Load();
            DisableAchievements.Load();
            GraphicsCore.Load();
            SimplifiedGraphicsFeature.Load();
            CenterCamera.Load();
            AutoMute.Load();
            HideGameplay.Load();
            HitboxTweak.Load();
            InfoHud.Load();
            ConsoleEnhancements.Load();

            AttributeUtils.Invoke <LoadAttribute>();

            // Open unix IO pipe for interfacing with Linux / Mac Celeste Studio
            if (UnixRtcEnabled)
            {
                File.Delete("/tmp/celestetas");
                UnixRtc = new NamedPipeServerStream("/tmp/celestetas", PipeDirection.InOut);
                UnixRtc.WaitForConnection();
                UnixRtcStreamOut = new StreamWriter(UnixRtc);
                UnixRtcStreamIn  = new StreamReader(UnixRtc);
                Logger.Log("CelesteTAS", "Unix socket is active on /tmp/celestetas");
            }

            // Open memory mapped file for interfacing with Windows Celeste Studio
            StudioCommunicationClient.Run();

#if DEBUG
            Benchmark.Load();
#endif
        }
コード例 #2
0
        public override void Unload()
        {
            Hotkeys.Unload();
            Core.Unload();
            FastForwardBoost.Unload();
            DisableAchievements.Unload();
            GraphicsCore.Unload();
            SimplifiedGraphicsFeature.Unload();
            CenterCamera.Unload();
            AutoMute.Unload();
            HideGameplay.Unload();
            HitboxTweak.Unload();
            InfoHud.Unload();
            ConsoleEnhancements.Unload();
            StudioCommunicationClient.Destroy();

            AttributeUtils.Invoke <UnloadAttribute>();

            UnixRtc?.Dispose();

#if DEBUG
            Benchmark.Unload();
#endif
        }