Esempio n. 1
0
        public static bool DisplayHSubtitle(Manager.Voice.Loader loader, AudioSource audioSource)
        {
            foreach (Dictionary <int, Dictionary <int, HVoiceCtrl.VoiceList> > a in (Dictionary <int, Dictionary <int, HVoiceCtrl.VoiceList> >[])dicdiclstVoiceListField.GetValue(HSceneManager.Instance.Hscene.ctrlVoice))
            {
                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)
                                {
                                    VRSubtitle.DisplayVRSubtitle(audioSource.gameObject, e.word);
                                    return(false);
                                }
                            }
                        }
                    }
                }
            }


            return(true);
        }
Esempio n. 2
0
            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;
                         }
                     }
                 }
             }
         }
     }
 }
Esempio n. 4
0
 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);
     }
 }
Esempio n. 5
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);
                }
            }
 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);
     }
 }