public void AddDownloadAgentHelper(IDownloadAgentHelper downlodAgentHeler) { DownloadAgent agent = new DownloadAgent(AddDownloadAgentHelper); agent.DownloadAgentStart += OnDownlodAgentStart; m_TaskPool.AddAgent(agent); }
void AddDownloadAgentHelper(IDownloadAgentHelper downloadAgentHelper) { DownloadAgent agent = new DownloadAgent(downloadAgentHelper); agent.DownloadAgentStart += OnDownloadAgentStart; agent.DownloadAgentUpdate += OnDownloadAgentUpdate; m_TaskPool.AddAgent(agent); }
/// <summary> /// 增加下载代理辅助器。 /// </summary> /// <param name="downloadAgentHelper">要增加的下载代理辅助器。</param> public void AddDownloadAgentHelper(IDownloadAgentHelper downloadAgentHelper) { DownloadAgent agent = new DownloadAgent(downloadAgentHelper); agent.DownloadAgentStart += OnDownloadAgentStart; agent.DownloadAgentUpdate += OnDownloadAgentUpdate; agent.DownloadAgentSuccess += OnDownloadAgentSuccess; agent.DownloadAgentFailure += OnDownloadAgentFailure; m_TaskPool.AddAgent(agent); }
public DownloadAgent(IDownloadAgentHelper downloadAgentHelper) { m_Helper = downloadAgentHelper; m_Task = null; m_FileStream = null; m_WaitFlushSize = 0; m_StartLength = 0; m_SavedLength = 0; m_Disposed = false; DownloadAgentStart = null; }
public DownloadAgent(IDownloadAgentHelper downloadAgentHelper) { if (downloadAgentHelper == null) { throw new GameFrameworkException("Download agent helper is invalid."); } m_Helper = downloadAgentHelper; m_Task = null; m_FileStream = null; m_WaitFlushSize = 0; m_WaitTime = 0; m_StartLength = 0; m_DownloadedLength = 0; m_SavedLength = 0; m_Disposed = false; DownloadAgentStart = null; DownloadAgentUpdate = null; DownloadAgentSuccess = null; DownloadAgentFailure = null; }
/// <summary> /// 初始化下载代理的新实例。 /// </summary> /// <param name="downloadAgentHelper">下载代理辅助器。</param> public DownloadAgent(IDownloadAgentHelper downloadAgentHelper) { if (downloadAgentHelper == null) { Debug.LogError("Download agent helper is invalid."); return; } m_Helper = downloadAgentHelper; m_Task = null; m_FileStream = null; m_WaitFlushSize = 0; m_WaitTime = 0f; m_StartLength = 0; m_DownloadedLength = 0; m_SavedLength = 0; m_Disposed = false; DownloadAgentStart = null; DownloadAgentUpdate = null; DownloadAgentSuccess = null; DownloadAgentProgress = null; DownloadAgentFailure = null; }