Пример #1
0
    public void ShowWarn(int iTitle, string strMsg, System.Action callback)
    {
        string sTitle = LanguageMgr.GetString(iTitle);

        Debug.LogError(strMsg);
        if (m_MessageBoxView == null)
        {
            System.Action <Object> handler = (asset) => {
                if (asset != null)
                {
                    GameObject objMsgBox = (GameObject)GameObject.Instantiate(asset);                      // 创建弹窗 显示
                    m_MessageBoxView = objMsgBox.GetComponent <MessageBoxView>();
                    NGUIUtility.SetParent(waitingParentT, objMsgBox.transform);
                    m_MessageBoxView.show(sTitle, strMsg, callback);
                }
            };

            StartCoroutine(BundleMgr.CreateObject(kResource.View, "MessageBoxView", "MessageBoxView", handler));
        }
    }
Пример #2
0
    // 警告弹窗 没连接上服务器 账号错误 等情况
    public void ShowWarn(int iTitle, int iMsg, System.Action callback)
    {
        string strMsg = LanguageMgr.GetString(iMsg);

        ShowWarn(iTitle, strMsg, callback);
    }