Exemplo n.º 1
0
 private static void OnSongStarted()
 {
     if ((PluginConfig.Instance.MultiEnabled && mpconnected) ||
         (PluginConfig.Instance.SingleEnabled && !mpconnected))
     {
         MicDeviceUtils.SetMicMute(true);
     }
 }
Exemplo n.º 2
0
 private static void OnRightGripChange(bool state)
 {
     if (PluginConfig.Instance.PTTMode == "R Grip" || (PluginConfig.Instance.PTTMode == "L+R Grip" && ControllersHelper.LeftGripState == state))
     {
         state ^= !PluginConfig.Instance.PTTInverted;
         MicDeviceUtils.SetMicMute(state);
         MuteButtonWindowController.Instance.UpdateMutebtn();
     }
 }
Exemplo n.º 3
0
 private static void OnLeftTriggerChange(bool state)
 {
     if (PluginConfig.Instance.PTTMode == "L Trigger" || (PluginConfig.Instance.PTTMode == "L+R Trigger" && ControllersHelper.RightTriggerState == state))
     {
         //XOR
         state ^= !PluginConfig.Instance.PTTInverted;
         MicDeviceUtils.SetMicMute(state);
         MuteButtonWindowController.Instance.UpdateMutebtn();
     }
 }
Exemplo n.º 4
0
        public void OnApplicationStart()
        {
            //Harmony
            Harmony = new HarmonyLib.Harmony(HarmonyId);
            Harmony.PatchAll(Assembly.GetExecutingAssembly());

            ControllersHelper.Init();
            new GameObject("MicMuterController").AddComponent <MicMuterController>();

            //Gameplay events to mute/unmute
            EventMute.Setup();

            //Register mod settings menu button
            BSMLSettings.instance.AddSettingsMenu("MicMuter", "MicMuter.UI.ConfigView.bsml", ConfigView.instance);

            //Microphone device setup
            MicDeviceUtils.Setup();
        }
Exemplo n.º 5
0
 public void OnApplicationQuit()
 {
     EventMute.Cleanup();
     MuteButtonWindowController.Instance.Cleanup();
     MicDeviceUtils.SetMicMute(false);
 }