Exemplo n.º 1
0
 private static void Postfix(InGameUI __instance)
 {
     if (!KataConfig.I.practiceMode)
     {
         AudicaMod.SetFOV(AudicaMod.fovSetting);
     }
 }
Exemplo n.º 2
0
 private static void Postfix(InGameUI __instance)
 {
     if (!KataConfig.I.practiceMode)
     {
         AudicaMod.ResetState();
     }
 }
Exemplo n.º 3
0
 private static void Prefix(AudioDriver __instance)
 {
     if (AudicaMod.skipQueued)
     {
         AudicaMod.SkipIntro();
     }
 }
Exemplo n.º 4
0
 private static void Postfix(SpectatorCam __instance)
 {
     if (AudicaMod.camOK && AudicaMod.spectatorCamSet && AudicaMod.activated)
     {
         AudicaMod.SpectatorCamUpdate();
     }
 }
Exemplo n.º 5
0
 private static void Postfix(OptionsMenu __instance, ref OptionsMenu.Page page)
 {
     if (page == OptionsMenu.Page.SpectatorCam)
     {
         AudicaMod.AddOptionsButtons(__instance);
     }
 }
Exemplo n.º 6
0
 private static void Prefix(MenuState __instance, ref MenuState.State state)
 {
     if (state == MenuState.State.MainPage || state == MenuState.State.SettingsPage)
     {
         MelonCoroutines.Start(AudicaMod.PerformChecks());
     }
 }
Exemplo n.º 7
0
 private static void Postfix(ScoreKeeper __instance)
 {
     if (AudicaMod.TempoRampEnabled)
     {
         AudicaMod.TempoRamp();
     }
 }
Exemplo n.º 8
0
            private static void Postfix(SongSelectItem __instance)
            {
                string songID = __instance.mSongData.songID;

                AudicaMod.selectedSong = songID;
                AudicaMod.ResetState();
            }
Exemplo n.º 9
0
            private static void Postfix(SpectatorCam __instance)
            {
                if (AudicaMod.spectatorCamSet)
                {
                    return;
                }

                AudicaMod.SetSpectatorCam(__instance, true);
            }
Exemplo n.º 10
0
 private static void Postfix(OptionsMenu __instance, ref OptionsMenu.Page page)
 {
     if (AudicaMod.menuSpawned && page != OptionsMenu.Page.Misc)
     {
         AudicaMod.menuSpawned = false;
     }
     else if (!AudicaMod.menuSpawned && page == OptionsMenu.Page.Misc)
     {
         AudicaMod.CreateSettingsButton(__instance);
     }
 }
Exemplo n.º 11
0
 private static void Prefix(ref MenuState.State state)
 {
     if (AudicaMod.spectatorCamFixed)
     {
         return;
     }
     if (state == MenuState.State.MainPage)
     {
         AudicaMod.FixSpectatorCam();
     }
 }
Exemplo n.º 12
0
 private static bool Prefix(SpectatorCam __instance)
 {
     if (AudicaMod.camOK && AudicaMod.spectatorCamSet && AudicaMod.config.activated)
     {
         AudicaMod.SpectatorCamUpdate();
         return(true);
     }
     else
     {
         return(false);
     }
 }
Exemplo n.º 13
0
 private static void Prefix(TwitchChatStream __instance, string msg)
 {
     //MelonLogger.Log("TwitchChatStream: " + msg);
     if (msg.Substring(0, 1) == "@")
     {
         if (msg.Contains("tmi.twitch.tv PRIVMSG "))
         {
             AudicaMod.ParsedTwitchMessage parsedMsg = AudicaMod.ParseTwitchMessage(msg);
             AudicaMod.ParseCommand(parsedMsg.message);
         }
     }
 }
Exemplo n.º 14
0
 private static void Postfix(MenuState __instance, ref MenuState.State state)
 {
     AudicaMod.oldMenuState = AudicaMod.menuState;
     AudicaMod.menuState    = state;
     if (AudicaMod.oldMenuState == MenuState.State.LaunchPage && state == MenuState.State.Launching)
     {
         AudicaMod.SetModifiersBefore();
     }
     else if (state != MenuState.State.Launched && AudicaMod.oldMenuState == MenuState.State.Launched)
     {
         AudicaMod.SetModifiersAfter();
     }
 }
Exemplo n.º 15
0
 private static void Postfix(MenuState __instance, ref MenuState.State state)
 {
     if (!AudicaMod.panelButtonsCreated)
     {
         if (!AudicaMod.buttonsBeingCreated && state == MenuState.State.SongPage)
         {
             AudicaMod.CreateSongPanelButton();
         }
         return;
     }
     if (state == MenuState.State.SongPage)
     {
         MelonCoroutines.Start(AudicaMod.SetRandomSongButtonActive(true));
     }
     else if (state == MenuState.State.LaunchPage || state == MenuState.State.MainPage)
     {
         MelonCoroutines.Start(AudicaMod.SetRandomSongButtonActive(false));
     }
 }
Exemplo n.º 16
0
            private static void Postfix(MenuState.State state)
            {
                if (state == MenuState.State.LaunchPage && !AudicaMod.panelCreated)
                {
                    AudicaMod.CreatePanel();
                    return;
                }
                if (!AudicaMod.panelCreated)
                {
                    return;
                }

                if (state == MenuState.State.LaunchPage)
                {
                    MelonCoroutines.Start(AudicaMod.SetPanelActive(true));
                }
                else
                {
                    MelonCoroutines.Start(AudicaMod.SetPanelActive(false));
                }
            }
Exemplo n.º 17
0
 private static void Postfix(MenuState __instance, ref MenuState.State state)
 {
     AudicaMod.menuState = state;
     if (!AudicaMod.panelButtonsCreated)
     {
         if (!AudicaMod.buttonsBeingCreated && state == MenuState.State.SongPage)
         {
             AudicaMod.CreateSongRequestFilterButton();
         }
         return;
     }
     if (state == MenuState.State.SongPage)
     {
         MelonCoroutines.Start(AudicaMod.SetFilterSongRequestsButtonnActive(true));
         MelonCoroutines.Start(AudicaMod.ProcessQueueCoroutine());
     }
     else if (state == MenuState.State.LaunchPage || state == MenuState.State.MainPage)
     {
         MelonCoroutines.Start(AudicaMod.SetFilterSongRequestsButtonnActive(false));
     }
 }
Exemplo n.º 18
0
            private static bool Prefix(OVRInput __instance)
            {
                if (!AudicaMod.introSkip || AudicaMod.introSkipped || AudicaMod.skipQueued || !AudicaMod.canSkip)
                {
                    return(true);
                }

                if (OVRInput.Get(OVRInput.Button.One, OVRInput.Controller.All))
                {
                    if (AudioDriver.I is null)
                    {
                        AudicaMod.QueueSkip();
                    }
                    else
                    {
                        AudicaMod.SkipIntro();
                    }
                }

                return(true);
            }
Exemplo n.º 19
0
 private static void Postfix(AudioDriver __instance)
 {
     AudicaMod.GetCues();
 }
Exemplo n.º 20
0
 private static void Postfix(SongSelectItem __instance)
 {
     AudicaMod.OnSelect(__instance);
 }
Exemplo n.º 21
0
 private static void Postfix(SongSelectItem __instance, int score, KataConfig.Difficulty difficulty, float percent, bool fullCombo)
 {
     AudicaMod.UpdateScoreDisplays(__instance, score);
 }
Exemplo n.º 22
0
 private static void Postfix(ScoreKeeperDisplay __instance)
 {
     AudicaMod.ScoreKeeperDisplayUpdate(__instance);
 }
Exemplo n.º 23
0
            private static void Postfix(SpectatorCam __instance)
            {
                if (AudicaMod.camOK)
                {
                    Camera thirdPersonCam = AudicaMod.spectatorCam.cam;

                    if (!AudicaMod.isMouseAwake)
                    {
                        AudicaMod.MouseAwake();
                    }

                    if (Input.GetKey(KeyCode.W))
                    {
                        thirdPersonCam.gameObject.transform.position = thirdPersonCam.gameObject.transform.position + thirdPersonCam.gameObject.transform.forward;
                    }

                    if (Input.GetKey(KeyCode.S))
                    {
                        thirdPersonCam.gameObject.transform.position = thirdPersonCam.gameObject.transform.position - thirdPersonCam.gameObject.transform.forward;
                    }

                    if (Input.GetKey(KeyCode.A))
                    {
                        thirdPersonCam.gameObject.transform.position = thirdPersonCam.gameObject.transform.position - thirdPersonCam.gameObject.transform.right;
                    }

                    if (Input.GetKey(KeyCode.D))
                    {
                        thirdPersonCam.gameObject.transform.position = thirdPersonCam.gameObject.transform.position + thirdPersonCam.gameObject.transform.right;
                    }

                    if (Input.GetKey(KeyCode.Space))
                    {
                        thirdPersonCam.gameObject.transform.position = thirdPersonCam.gameObject.transform.position + thirdPersonCam.gameObject.transform.up;
                    }

                    if (Input.GetKey(KeyCode.C))
                    {
                        thirdPersonCam.gameObject.transform.position = thirdPersonCam.gameObject.transform.position - thirdPersonCam.gameObject.transform.up;
                    }

                    if (Input.GetKey(KeyCode.Mouse1))
                    {
                        float MIN_X = 0.0f;
                        float MAX_X = 360.0f;
                        float MIN_Y = -90.0f;
                        float MAX_Y = 90.0f;

                        AudicaMod.xAxis += Input.GetAxis("Mouse X") * (AudicaMod.mouseSensitivity * Time.deltaTime);

                        /*
                         * if (xAxis < MIN_X) xAxis = MIN_X;
                         * else if (xAxis > MAX_X) xAxis = MAX_X;
                         */

                        AudicaMod.yAxis -= Input.GetAxis("Mouse Y") * (AudicaMod.mouseSensitivity * Time.deltaTime);

                        /*
                         * if (yAxis < MIN_Y) yAxis = MIN_Y;
                         * else if (yAxis > MAX_Y) yAxis = MAX_Y;
                         */

                        thirdPersonCam.gameObject.transform.rotation = Quaternion.Euler(AudicaMod.yAxis, AudicaMod.xAxis, 0.0f);
                    }

                    if (Input.GetKey(KeyCode.Z))
                    {
                        Vector3 euler = thirdPersonCam.gameObject.transform.rotation.eulerAngles;
                        thirdPersonCam.gameObject.transform.rotation = Quaternion.Euler(euler.y, euler.x, euler.z + 1.0f);
                    }

                    if (Input.GetKey(KeyCode.X))
                    {
                        Vector3 euler = thirdPersonCam.gameObject.transform.rotation.eulerAngles;
                        thirdPersonCam.gameObject.transform.rotation = Quaternion.Euler(euler.y, euler.x, euler.z - 1.0f);
                    }
                }
            }
Exemplo n.º 24
0
 private static void Postfix(SongInfoPanel __instance, ref SongInfoTopScoreItem item)
 {
     AudicaMod.SetTopScore(item);
 }
Exemplo n.º 25
0
 private static void Prefix(InGameUI __instance)
 {
     AudicaMod.TriggerRestart();
 }
Exemplo n.º 26
0
 private static void Postfix(OptionsMenu __instance, ref OptionsMenu.Page page)
 {
     AudicaMod.ShowPage(__instance, page);
 }