/// <summary> /// 打开界面 /// </summary> /// <param name="type"></param> /// <param name="layer"></param> /// <param name="arms"></param> private void OpenUIP(Type type, UIModelData data, UILayer layer, params object[] arms) { GameObject go; bool has = GetModuleObject(type, layer, out go); if (go != null) { go.SetActive(false); UIBase ui = go.GetComponent <UIBase>(); if (ui == null) { return; } ui.InitData(type, layer, arms); if (!has) { SetModuleParent(ui); } else { if (!m_ShowOrder.Contains(ui)) { m_ShowOrder.Insert(0, ui); } } ui.OnShow(); } }
/// <summary> /// 添加面板资源 /// </summary> /// <param name="model"></param> public void AddModelData(UIModelData model) { if (!m_AllModelDataDic.ContainsKey(model.m_Type)) { m_AllModelDataDic.Add(model.m_Type, model); } }