Ejemplo n.º 1
0
            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);
     }
 }