private static void PlayVoice(LoadAudioBase __instance)
 {
     if (SubtitleDictionary.TryGetValue(__instance.assetName, out string text))
     {
         Caption.DisplaySubtitle(__instance.gameObject, text);
     }
 }
 internal static void OncePlayCharaPostfix(Manager.Voice.Loader loader, AudioSource __result)
 {
     if (HSceneInstance?.ctrlVoice != null)
     {
         DisplayHSubtitle(loader, __result);
     }
     else if (SubtitleDictionary.TryGetValue(loader.asset, out string text))
     {
         Caption.DisplaySubtitle(__result, loader.asset, text);
     }
 }
Beispiel #3
0
            private static void PlayPostfix(Human __instance, string asset, bool isOneShot, bool __result)
            {
                if (!__result || !isOneShot || AssetTypesToSkip.Contains(GetAssetType(asset)))
                {
                    return;
                }

                if (SubtitleDictionary.TryGetValue(asset, out var text))
                {
                    Caption.DisplaySubtitle(__instance.voice.voiceSource, text, asset);
                }
            }
Beispiel #4
0
            private static void PlayPostfix(Manager.Sound.Loader loader, AudioSource __result)
            {
                if (loader.asset.IsNullOrEmpty() || loader.asset.Contains("_bgm_"))
                {
                    return;
                }

                if (SubtitleDictionary.TryGetValue(loader.asset, out string text))
                {
                    Caption.DisplaySubtitle(__result.gameObject, text);
                }
            }
            private static void PlaySound(AudioSource audioSource, Manager.Sound.Loader loader)
            {
                if (loader.asset.IsNullOrEmpty() || loader.asset.Contains("_bgm_") || loader.asset.StartsWith("kks_song"))
                {
                    return;
                }

                if (SubtitleDictionary.TryGetValue(loader.asset, out string text))
                {
                    Caption.DisplaySubtitle(audioSource.gameObject, text);
                }
            }
Beispiel #6
0
            private static void PlayStandbyPostfix(AudioSource audioSource, Manager.Voice.Loader loader)
            {
                if (loader.asset.IsNullOrEmpty() || loader.asset.Contains("_bgm_"))
                {
                    return;
                }

                if (HSceneInstance != null && HSceneInstance.ctrlVoice != null)
                {
                    DisplayHSubtitle(loader, audioSource);
                }
                else if (SubtitleDictionary.TryGetValue(loader.asset, out string text))
                {
                    Caption.DisplaySubtitle(audioSource.gameObject, text);
                }
            }
Beispiel #7
0
            public static void PlayVoice(LoadAudioBase __instance)
            {
                string[] assetNameSplit = __instance.assetName.Split('_');

                if (assetNameSplit[0] == "he")
                {
                    return;                            //Dialogue
                }
                if (assetNameSplit[0] == "hs" && assetNameSplit.Length >= 3 && int.TryParse(assetNameSplit[2], out int result) && result <= 226)
                {
                    return;                                                                                                                              //Breath
                }
                if (SubtitleDictionary.TryGetValue(__instance.assetName, out string text))
                {
                    Caption.DisplaySubtitle(__instance, text);
                }
            }
            internal static void PlayVoice(LoadAudioBase __instance)
            {
                if (__instance.audioSource == null || __instance.audioSource.clip == null || __instance.audioSource.loop)
                {
                    return;
                }

                if (HSceneProcInstance != null)
                {
                    Caption.DisplayHSubtitle(__instance);
                }
                else if (ActionGameInfoInstance != null && GameObject.Find("ActionScene/ADVScene") == null)
                {
                    Caption.DisplayDialogueSubtitle(__instance);
                }
                else if (SubtitleDictionary.TryGetValue(__instance.assetName, out string text))
                {
                    Caption.DisplaySubtitle(__instance, text);
                }
            }
 private static void PlayVoice(AudioSource audioSource, Manager.Voice.Loader loader)
 {
     if (loader.asset.IsNullOrEmpty())
     {
         return;
     }
     if (SubtitleDictionary.TryGetValue(loader.asset, out string text))
     {
         Caption.DisplaySubtitle(audioSource.gameObject, text);
     }
     else if (HSceneInstance != null)
     {
         Caption.DisplayHSubtitle(loader.asset, loader.bundle, audioSource.gameObject);
     }
     else if (EstheticProcInstance != null)
     {
         Caption.DisplayEstheticSubtitle(loader.asset, loader.bundle, audioSource.gameObject);
     }
     else if (ActionGameInfoInstance != null && GameObject.Find("ActionScene/ADVScene") == null)
     {
         Caption.DisplayDialogueSubtitle(loader.asset, loader.bundle, audioSource.gameObject);
     }
 }