void SendDownLoadProgressArgs(int idx, string url, float progress) { ArgsDownLoadProgress msg = new ArgsDownLoadProgress(); msg.total = totalDownKB; msg.progress = GetCurKb(idx, progress) / totalDownKB; NotificationCenter.Instance().PostDispatchEvent((uint)ENotificationMsgType.EDownLoadProgress, msg); }
/// <summary> /// 通过DownLoad中 算是总的KB;根据每个包的KB *progress ==>>最终进度 /// </summary> /// <param name="e"></param> void UpdateDownLoad(LocalNotification e) { ArgsDownLoadProgress msg = e.param as ArgsDownLoadProgress; if (msg != null) { UpdateProgress(msg.total, msg.progress); } }
void SendDownOverArgs() { Debug.Log("isOver++++" + downLoadTime); ArgsDownLoadProgress msg = new ArgsDownLoadProgress(); msg.total = totalDownKB; msg.progress = 1; NotificationCenter.Instance().PostDispatchEvent((uint)ENotificationMsgType.EDownLoadProgress, msg); }