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 ClearMiniDrama() { if (null != BugFixAudio.PlayOnceRoot) { int childCount = BugFixAudio.PlayOnceRoot.transform.childCount; for (int i = 0; i < childCount; i++) { Transform child = BugFixAudio.PlayOnceRoot.transform.GetChild(i); if (child != null) { UnityEngine.Object.Destroy(child.gameObject); } } } UIDataManager.MuteMiniDramaSound(false); if (!UIDataManager.MuteBGM && this.m_BGMAudio != null) { this.m_BGMAudio.Play(); } this._Camera.Destory(null); foreach (MonoBehaviour current in this._EnableComponent) { if (current != null) { current.enabled = true; } } this._EnableComponent.Clear(); NrTSingleton <NkCharManager> .Instance.ShowHideAll(true, true, true); this._ActorManger.DelActorAll(); NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.MINIDRAMACAPTION_DLG); this._ShowTime = false; if (this._bNpcTalk) { NrTSingleton <FormsManager> .Instance.Show(G_ID.NPCTALK_DLG); } else { NrTSingleton <NkClientLogic> .Instance.SetNPCTalkState(false); if (NrTSingleton <NkQuestManager> .Instance.IsCompletedFirstQuest()) { NrTSingleton <FormsManager> .Instance.Main_UI_Show(FormsManager.eMAIN_UI_VISIBLE_MODE.COMMON); } } this._bNpcTalk = false; if (TsPlatform.IsMobile) { } NrTSingleton <NkQuestManager> .Instance.AutoQuestExcute(); }