Ejemplo n.º 1
0
    public void OnUpdateDownloadStart(WWW www)
    {
        TTLoger.LogError("开始下载:" + www.url);

        this.startTime = TimeKit.GetMillisTime();

        if (OnStartDownload != null)
        {
            OnStartDownload(www);
        }
    }
Ejemplo n.º 2
0
    public void OnUpdateDownloading(WWW www)
    {
        TTLoger.LogError(string.Format("下载中({0}):{1}", www.bytesDownloaded, www.url));
        long nowTime = TimeKit.GetMillisTime();

        downloadSpeed = 1000.0f / 1024 / 1024 * www.bytesDownloaded / (nowTime - startTime);

        if (OnDownloading != null)
        {
            OnDownloading(www);
        }
    }