예제 #1
0
파일: TableMgr.cs 프로젝트: moto2002/Fish
        public void ReloadAll()
        {
            TableReadThreadWork readWork = CreateTableReadJobs(TableConfig.preLoadTableArray, TableConfig.delayLoadTableArray);

            readWork.Start();
            // 阻塞Reload
            while (readWork.IsDone == false)
            {
            }
        }
예제 #2
0
파일: TableMgr.cs 프로젝트: moto2002/Fish
        /// <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);
        }
예제 #3
0
파일: TableMgr.cs 프로젝트: moto2002/Fish
        public IEnumerator ReadAll(TDTableMetaData[] dataArray, Action onLoadFinish)
        {
            m_IsLoading = true;
            TableReadThreadWork readWork = CreateTableReadJobs(dataArray);

            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);
        }