Exemplo n.º 1
0
        public void Initialize(IManager manager, string ipcIdentifier)
        {
            // Patch existing classes
            try
            {
                CurrentPlugin.Initialize();
                SharedAudio.Init();

                HarmonyInstance Harmony = HarmonyInstance.Create("com.REHERC.NitronicRushStart");
                Harmony.PatchAll(Assembly.GetExecutingAssembly());
            }
            catch (Exception e)
            {
            }

            // Subscribe to events
            Events.Scene.StartLoad.Subscribe((data) =>
            {
                SharedAudio.Reset();
            });

            Events.GameMode.ModeStarted.Subscribe((data) =>
            {
                SharedAudio.Reset();
            });
        }
Exemplo n.º 2
0
        public static void Reset()
        {
            Countdown_3.Stop();
            Countdown_2.Stop();
            Countdown_1.Stop();
            Countdown_Rush.Stop();

            string Data = CurrentPlugin.PluginDataPath();

            Countdown_3.Init(new WaveFileReader($@"{Data}\Audio\3.wav"));
            Countdown_2.Init(new WaveFileReader($@"{Data}\Audio\2.wav"));
            Countdown_1.Init(new WaveFileReader($@"{Data}\Audio\1.wav"));
            Countdown_Rush.Init(new WaveFileReader($@"{Data}\Audio\rush.wav"));
        }