Exemplo n.º 1
0
 public static void OpenDownLoadUI(int monID, DelegateLoadFinished callBack, DelegateCloes close = null, WinType type = WinType.WT_One)
 {
     if (_instance == null)
     {
         UIDownModel modeWin = UIDownModel.CreateWin(type);
         if (modeWin != null)
         {
             _instance = modeWin;
             if (type == WinType.WT_One)
             {
                 if (TeamUI.mInstance != null)
                 {
                     modeWin.SetWinRoot(TeamUI.mInstance.m_teamView.gameObject);
                 }
                 else
                 {
                     modeWin.SetWinRoot(DBUIController.mDBUIInstance._TopRoot);
                 }
             }
             else
             {
                 modeWin.SetWinRoot(DBUIController.mDBUIInstance._TopRoot);
             }
         }
     }
     _instance.SetDownloadModel(monID, callBack);
     _instance.m_EventCloes = close;
 }
Exemplo n.º 2
0
    public void SetDownloadModel(int id, DelegateLoadFinished LoadFinish)
    {
        m_DownTimeStr     = Core.Data.stringManager.getString(90000); //预计下载时间
        m_SecondStr       = Core.Data.stringManager.getString(90003); //秒
        m_DownloadModelID = id;
        string prefabName = "pb" + id;

        m_DownloadModelName = prefabName + ".unity3d";
        m_DownloadModelSize = float.Parse(Core.Data.sourceManager.getSouceSize(m_DownloadModelName));
        m_DownloadModelSize = m_DownloadModelSize / 1024 / 1024;
        string str1 = SetLabelColor(color2, "0");

        SetDownloadSizeLabel(str1 + "/" + m_DownloadModelSize.ToString("F") + "MB");

        m_Slider.value = 0;

        m_DownloadTime = m_DownloadModelSize * m_CurDownTime;
        string str = m_DownTimeStr + SetLabelColor(color2, m_DownloadTime.ToString("F")) + m_SecondStr;

        SetDownloadTimeLabel(str);

        m_EventLoadFinished = LoadFinish;
    }
Exemplo n.º 3
0
 public static void OpenDownLoadUI(int monID, DelegateLoadFinished callBack, Vector3 pos, DelegateCloes close = null, WinType type = WinType.WT_One)
 {
     OpenDownLoadUI(monID, callBack, close, type);
     _instance.transform.localPosition = pos;
 }