public bool StartMiniDrama() { this.m_BGMAudio = null; UIDataManager.MuteMiniDramaSound(true); if (!UIDataManager.MuteBGM && NrTSingleton <NkQuestManager> .Instance.IsCompletedFirstQuest()) { TsAudioAdapterBGM[] array = UnityEngine.Object.FindObjectsOfType(typeof(TsAudioAdapterBGM)) as TsAudioAdapterBGM[]; TsAudioAdapterBGM[] array2 = array; for (int i = 0; i < array2.Length; i++) { TsAudioAdapterBGM tsAudioAdapterBGM = array2[i]; if (tsAudioAdapterBGM != null && tsAudioAdapterBGM.gameObject != null) { string text = tsAudioAdapterBGM.gameObject.name.ToLower(); if (text.Contains("bgm")) { this.m_BGMAudio = tsAudioAdapterBGM.GetAudioEx(); this.m_BGMAudio.Stop(); break; } } } } foreach (MonoBehaviour current in this._EnableComponent) { current.enabled = false; } NrTSingleton <NkClientLogic> .Instance.SetNPCTalkState(true); NrTSingleton <NkCharManager> .Instance.ShowHideAll(false, false, false); Form form = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.NPCTALK_DLG); if (form != null) { this._bNpcTalk = form.Visible; } NrTSingleton <FormsManager> .Instance.HideAll(); UI_MiniDramaCaption uI_MiniDramaCaption = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.MINIDRAMACAPTION_DLG) as UI_MiniDramaCaption; if (uI_MiniDramaCaption != null) { if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.MINIDRAMACAPTION_DLG)) { uI_MiniDramaCaption.Show(); uI_MiniDramaCaption.ShowBG(false); } } else { NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MINIDRAMACAPTION_DLG); } this._Camera.Standby(); this._ShowTime = true; if (TsPlatform.IsMobile) { } return(true); }
public void ShowCaption(string ActorName, string Talk) { UI_MiniDramaCaption uI_MiniDramaCaption = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.MINIDRAMACAPTION_DLG) as UI_MiniDramaCaption; MiniDramaActorController actorController = this.GetActorController(ActorName); if (actorController != null) { string name = string.Empty; if (actorController.GetCharBase().GetID() == 1) { name = actorController.GetCharBase().GetCharName(); } else { name = actorController.GetCharBase().GetCharKindInfo().GetName(); } uI_MiniDramaCaption.SetName(name); } else { uI_MiniDramaCaption.SetName(string.Empty); } uI_MiniDramaCaption.ShowBG(true); uI_MiniDramaCaption.SetTalk(Talk); }
public void HideCaption(string Talk) { UI_MiniDramaCaption uI_MiniDramaCaption = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.MINIDRAMACAPTION_DLG) as UI_MiniDramaCaption; if (uI_MiniDramaCaption != null && uI_MiniDramaCaption.GetCurrentTalk() == Talk) { uI_MiniDramaCaption.ShowBG(false); } }