Beispiel #1
0
    public void ClickBtn1()
    {
        UGUIManager.Instance.Open(UGUI_TYPE.UITest);
        CommonUIRefresh refresh = new CommonUIRefresh();

        refresh.UIType   = UGUI_TYPE.UITest;
        refresh.function = RefreshFuncType.CommonJump;
        refresh.SetParam(10, "haha");
        MessageManager.Instance.SendMessage(refresh);
    }
    /// <summary>
    /// 传递参数,刷新UI,为了通用性,在ugui中监听并处理,不用每个UI都监听
    /// </summary>
    /// <param name="msg"></param>
    public void RefreshUI(Message msg)
    {
        CommonUIRefresh refresh = (CommonUIRefresh)msg;
        var             window  = GetUI(refresh.UIType);

        if (window != null)
        {
            window.Refresh(refresh.function, refresh.GetParam());
        }
    }