public void OpenUIForms(params string[] uiFormNames) { for (int i = 0; i < uiFormNames.Length; i++) { string uiFormName = uiFormNames[i]; if (m_DicOpenUIForms.ContainsKey(uiFormName)) { continue; } UIConfigData uiInfo = uIConfig.GetDataByKey(uiFormName); if (uiInfo == null) { Debug.LogWarning(GetType() + "/OpenUIForms()/ui is null! uiFormName:" + uiFormName); return; } if (m_DicAllUIForms.ContainsKey(uiFormName)) { openUIForm(uiFormName); } else { m_DicAllUIForms.Add(uiFormName, null); loadUIForm(uiInfo, uiFormName); } } }
public void OpenUIForms(params string[] uiFormNames) { for (int i = 0; i < uiFormNames.Length; i++) { string uiFormName = uiFormNames[i]; if (dicOpenUIForms.ContainsKey(uiFormName)) { continue; } UIConfigData uiInfo = uIConfig.GetDataByKey(uiFormName); if (uiInfo == null) { Debug.LogWarning(GetType() + "/OpenUIForms()/ Open ui error! ui is null! uiFormName:" + uiFormName); return; } if (dicAllUIForms.ContainsKey(uiFormName)) { ChangeUIFormState(uiFormName, UIFormState.Open); if (dicAllUIForms[uiFormName] != null) { dicAllUIForms[uiFormName].gameObject.SetActive(true); } if (dicAllUIForms[uiFormName] != null) { dicOpenUIForms.Add(uiFormName, dicAllUIForms[uiFormName]); } } else { dicAllUIForms.Add(uiFormName, null); ChangeUIFormState(uiFormName, UIFormState.Loading); LoadUIForm(uiInfo, uiFormName); } } }