public void ReloadAll() { TableReadThreadWork readWork = CreateTableReadJobs(TableConfig.preLoadTableArray, TableConfig.delayLoadTableArray); readWork.Start(); // 阻塞Reload while (readWork.IsDone == false) { } }
/// <summary> /// 预先读取Language Const表 /// </summary> /// <returns></returns> public IEnumerator PreReadAll(Action onLoadFinish) { TableReadThreadWork readWork = CreateTableReadJobs(TableConfig.preLoadTableArray); readWork.Start(); while (readWork.IsDone == false) { yield return(0); } if (onLoadFinish != null) { onLoadFinish(); } yield return(0); }
public IEnumerator ReadAll(Action onLoadFinish) { m_IsLoading = true; TableReadThreadWork readWork = CreateTableReadJobs(TableConfig.delayLoadTableArray); readWork.Start(); while (readWork.IsDone == false) { m_TableReadProgress = readWork.finishedCount * 1.0f / readWork.readMaxCount * 1.0f; yield return(0); } m_IsLoading = false; if (onLoadFinish != null) { onLoadFinish(); } yield return(0); }