Ejemplo n.º 1
0
        void _showDownloadErrMsg()
        {
            var info = new MsgBoxInfo()
            {
                Title         = LM.GetStr("提示"),
                BtnTxtM       = LM.GetStr("确定"),
                Msg           = LM.GetStr("资源下载失败,请检查网络"),
                ClickCallback = _onDownlaodErrMsgBox,
            };

            MsgBoxMgr.Instance.ShowMsg(info);
        }
Ejemplo n.º 2
0
        void _showDownloadMsg(long size)
        {
            var info = new MsgBoxInfo()
            {
                Title         = LM.GetStr("提示"),
                BtnTxtM       = LM.GetStr("确定"),
                Msg           = LM.GetStr("检测到更新资源,共计<color=blue>{0}</color>,推荐使用Wifi下载。", Tools.FormatMeroySize(size)),
                ClickCallback = _onDownloadMsgBox,
            };

            MsgBoxMgr.Instance.ShowMsg(info);
        }
Ejemplo n.º 3
0
        void _showCheckErrMsg()
        {
            //更新检测失败
            var info = new MsgBoxInfo()
            {
                Title         = LM.GetStr("提示"),
                BtnTxtL       = LM.GetStr("退出游戏"),
                BtnTxtR       = LM.GetStr("强制进入"),
                Msg           = LM.GetStr("获取更新信息失败,是否强制进入游戏?\n<color=red>强制进入可能引起程序异常。</color>"),
                ClickCallback = _onCheckUpErrMsgBox,
            };

            MsgBoxMgr.Instance.ShowMsg(info);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// 检测 app 是否需要更新,如果有更新弹出确认框,跳转应用商店或者下载更新
 /// </summary>
 public void CheckAPP(Action skipUpAppCall)
 {
     Platform.CheckAppVer((bool isLatest, string msg) =>
     {
         if (!isLatest)
         {
             MsgBoxMgr.Instance.ShowMsg(LM.GetStr("提示"), LM.GetStr(msg), (idx) =>
             {
                 Platform.UpdateApp();
             });
         }
         else
         {
             if (null != skipUpAppCall)
             {
                 skipUpAppCall();
             }
         }
     });
 }
Ejemplo n.º 5
0
 /// <summary>
 /// 请勿直接调用,使用Instance方法获取单例
 /// 初始化后直接检查服务器资源
 /// </summary>
 public void Init(string downloadKey, string finishKey)
 {
     mDownLoadKey = downloadKey;
     mFinishKey   = finishKey;
     _changeState(LM.GetStr("检测服务器资源..."));
     LoadServConf((ret) =>
     {
         if (GameConfig.UseAsb && GameConfig.CheckUpdate)
         {
             _changeState(LM.GetStr("检测App版本..."));
             CheckAPP(() =>
             {
                 _changeState(LM.GetStr("检测本地资源..."));
                 CheckPkgsCotained();
             });
         }
         else
         {
             StartGameLogic();
         }
     });
 }