private static void DisplayHSubtitle(Manager.Voice.Loader loader, AudioSource audioSource) { Dictionary <int, Dictionary <int, HVoiceCtrl.VoiceList> >[] dicdiclstVoiceList = (Dictionary <int, Dictionary <int, HVoiceCtrl.VoiceList> >[])Traverse.Create(HSceneInstance.ctrlVoice).Field("dicdiclstVoiceList").GetValue(); foreach (Dictionary <int, Dictionary <int, HVoiceCtrl.VoiceList> > a in dicdiclstVoiceList) { foreach (Dictionary <int, HVoiceCtrl.VoiceList> b in a.Values) { foreach (HVoiceCtrl.VoiceList c in b.Values) { foreach (Dictionary <int, HVoiceCtrl.VoiceListInfo> d in c.dicdicVoiceList) { foreach (var e in d.Values) { if (e.nameFile == loader.asset && e.pathAsset == loader.bundle) { Caption.DisplaySubtitle(audioSource, e.nameFile, e.word); return; } } } } } } }
private static void DisplayHSubtitle(Manager.Voice.Loader loader, AudioSource audioSource) { foreach (Dictionary <int, Dictionary <int, HVoiceCtrl.VoiceList> > a in HSceneInstance.ctrlVoice.dicdiclstVoiceList) { foreach (Dictionary <int, HVoiceCtrl.VoiceList> b in a.Values) { foreach (HVoiceCtrl.VoiceList c in b.Values) { foreach (Dictionary <int, HVoiceCtrl.VoiceListInfo> d in c.dicdicVoiceList) { foreach (var e in d.Values) { if (e.nameFile == loader.asset && e.pathAsset == loader.bundle) { if (Application.productName == Constants.VRProcessName) { Caption.DisplayVRSubtitle(audioSource.gameObject, e.word); } else { Caption.DisplaySubtitle(audioSource.gameObject, e.word); } return; } } } } } } }
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); } }
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); } }
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); } }
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); } }
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); } }