コード例 #1
0
    /// <summary>
    /// 移除显示ui, 从BaseUi的隐藏方法调用过来
    /// </summary>
    /// <param name="type"></param>
    public void RemoveShowingDic(Type type)
    {
        if (showingList.Count == 0 || type == null || (!showingUiDic.ContainsKey(type)))
        {
            return;
        }
        BaseUi baseUi = GetCurShowingUi();

        if (baseUi != null)
        {
            baseUi.OnPopUi();
        }
        else
        {
            // 界面没打开时不能触发。这地方关联有点多, 有空要优化下。
            if (GetUi <UiPnlMainCityMenu>() != null)
            {
                GetUi <UiPnlMainCityMenu>().OnPopUi();
            }
        }
        showingList.Remove(type);
        showingUiDic.Remove(type);
    }