void OpenMainUI(object obj) { PlatformLoginBehaviour.message += " For91 OpenUI:"; var loginUIType = (LoginUIType)obj; CloseAllPanel(); IUIPanel uiPanel = null; if (UIList.TryGetValue(loginUIType, out uiPanel)) { uiPanel.Show(); } else { uiPanel = GetPanel(loginUIType); uiPanel.Show(); UIList.Add(loginUIType, uiPanel); } if (loginUIType == LoginUIType.CreatRole) { SetCamera(); } if (loginUIType == LoginUIType.CreatRole || loginUIType == LoginUIType.SelectRole) { //SoundManager.Instance.StopBGM(0.0f); //SoundManager.Instance.PlayBGM("Music_UIBG_LoginCharacter", 0.0f); } }
void OpenMainUI(object obj) { m_curUIType = (LoginUIType)obj; CloseAllPanel(); IUIPanel uiPanel = null; if (UIList.TryGetValue(m_curUIType, out uiPanel)) { uiPanel.Show(); m_curUIPanel = uiPanel.gameObject; } else { uiPanel = GetPanel(m_curUIType); m_curUIPanel = uiPanel.gameObject; uiPanel.Show(); UIList.Add(m_curUIType, uiPanel); } if (m_curUIType == LoginUIType.CreatRole) { SetCamera(); } if (m_curUIType == LoginUIType.CreatRole || m_curUIType == LoginUIType.SelectRole) { //SoundManager.Instance.StopBGM(0.0f); //SoundManager.Instance.PlayBGM("Music_UIBG_LoginCharacter", 0.0f); } }
/// <summary> /// 显示UIBehaiviour /// </summary> /// <param name="uiBehaviourName"></param> public void ShowUI(string uiBehaviourName) { IUIPanel iuiPanel = null; if (mAllUI.TryGetValue(uiBehaviourName, out iuiPanel)) { iuiPanel.Show(); } }