Exemple #1
0
        public static void  Start()
        {
            lock (thisLock)
            {
                m_IsRunning = false;
            }
            Stopwatch allWatch = new Stopwatch();

            allWatch.Start();

            {
                Stopwatch stopwatch = new Stopwatch();
                //加载配置
                stopwatch.Start();
                AttrMgr.Init();
                ConfigMgr.Inst().InitConfigMgr();
                stopwatch.Stop();

                TraceLog.ReleaseWrite("加载游戏execl配置文件完成,共花费时间 {0} ms", stopwatch.Elapsed.TotalMilliseconds);
            }

            {
                Stopwatch stopwatch = new Stopwatch();
                stopwatch.Start();
                MapMgr.Inst().Init();
                stopwatch.Stop();
                TraceLog.ReleaseWrite("加载游戏地图数据完成,共花费时间 {0} ms", stopwatch.Elapsed.TotalMilliseconds);
            }

            {
                Stopwatch stopwatch = new Stopwatch();
                stopwatch.Start();
                SceneMgr.Inst().Init();
                stopwatch.Stop();
                TraceLog.ReleaseWrite("创建场景完成,共花费时间 {0} ms", stopwatch.Elapsed.TotalMilliseconds);
            }


            allWatch.Stop();
            TraceLog.ReleaseWrite("加载全部配置,共花费时间 {0} ms", allWatch.Elapsed.TotalMilliseconds);

            lock (thisLock)
            {
                m_IsRunning = true;
            }
        }