示例#1
0
    //
    private string GetIFSStateTipText(IFSState st)
    {
        string tip = "";

        switch (st)
        {
        //开始
        case IFSState.Start:
            tip = "开始游戏资源检查!";
            break;

        case IFSState.FirstMoveInit:
        case IFSState.FirstMoving:
        case IFSState.FirstMoveSuccess:
        case IFSState.FirstMoveFailed:
            tip = "解压游戏资源,不消耗流量!";
            break;

        case IFSState.FirstDownloadInit:
        case IFSState.FirstDownloading:
        case IFSState.FirstDownloadSuccess:
        case IFSState.FirstDownloadFailed:
            tip = "下载游戏资源包!";
            break;

        case IFSState.FirstUnZip:
            tip = "解压游戏资源包!";
            break;

        case IFSState.LocalFileListInit:
        case IFSState.LocalFileListCheck:
            tip = "资源正确性校正!";
            break;

        case IFSState.NetFileListDownload:
        case IFSState.LocalDiffNetFileList:
            tip = "检查游戏资源更新列表!";
            break;

        case IFSState.DownloadDiffFileListBegin:
        case IFSState.DownloadingDiff:
        case IFSState.DownloadDiffSuccess:
            tip = "更新游戏资源!!";
            break;

        //结束
        case IFSState.Over:
            tip = "准备游戏资源即将进入游戏!";
            break;

        default:
            tip = "加载游戏资源!";
            break;
        }
        return(tip);
    }
 private void CallSessionHandler(IFSState st, float progress = 0)
 {
     if (_curSession != null)
     {
         if (_curSession.SessionHandler != null)
         {
             _curSession.SessionHandler(_curSession.Name, (int)st, progress, _errorCnt);
         }
     }
 }