/// <summary>
        /// 卸载动物园游戏
        /// </summary>
        public void UnLoad()
        {
            this.callbacks = null;
            ////关闭主界面
            //PageMgr.ClosePage();

            CloseAllPage();

            //停止游戏
            GameModuleManager.GetInstance().Stop();
            //卸载module
            GameManager.GetInstance().UnLoadModule();
            //GameManager.GetInstance().RemoveAllTickPage();

            //卸载加载出来的实体
            EntityManager.GetInstance().Release();

            //卸载各pool
            PoolManager.GetInstance().Release();

            ResourceManager.GetInstance().Release();

            //全局数据释放
            GlobalDataManager.GetInstance().Release();
            //卸载场景

            Resources.UnloadUnusedAssets();
            System.GC.Collect();
        }
        public void LoadSceneModule()
        {
            //
            //玩家数据维护
            GameModuleManager.GetInstance().AddMoudle(new PlayerDataModule(moduleOrderID++));
            //动物数据维护
            //GameModuleManager.GetInstance().AddMoudle(new AnimalModule(moduleOrderID++));

            //生成
            GameModuleManager.GetInstance().AddMoudle(new ParkingCenter(moduleOrderID++));
            GameModuleManager.GetInstance().AddMoudle(new SpawnModule(moduleOrderID++));

            //决策模块
            //大门
            GameModuleManager.GetInstance().AddMoudle(new EntryGateModule(moduleOrderID++));

            //动物栏
            GameModuleManager.GetInstance().AddMoudle(new LittleZooModule(moduleOrderID++));

            //Buff
            GameModuleManager.GetInstance().AddMoudle(new BuffModule(moduleOrderID++));

            //道具
            GameModuleManager.GetInstance().AddMoudle(new ItemModule(moduleOrderID++));

            //移动
            GameModuleManager.GetInstance().AddMoudle(new MoveMovableEntityMoudle(moduleOrderID++));

            //世界地图
            GameModuleManager.GetInstance().AddMoudle(new WordlMapModule(moduleOrderID++));

            //引导任务
            GameModuleManager.GetInstance().AddMoudle(new GuideMissionModule(moduleOrderID++));

            //杂项模块
            GameModuleManager.GetInstance().AddMoudle(new MiscModule(moduleOrderID++));

            //图鉴收集模块
            //GameModuleManager.GetInstance().AddMoudle(new AnimalAtlasModule(moduleOrderID++));

            //过马路体力模块
            GameModuleManager.GetInstance().AddMoudle(new CrossRoadGame.CrossRoadStrengthModule(moduleOrderID++));

            GameModuleManager.GetInstance().Stop();
        }
        public override void Tick(int deltaTimeMS)
        {
            //MessageManager不受暂停和停止限制
            MessageManager.GetInstance().Tick();

            if (!this.CouldRun())
            {
                return;
            }

            GameModuleManager.GetInstance().Tick(deltaTimeMS);

            foreach (var val in tickedPages.Values)
            {
                if (val != null)
                {
                    val.Tick(deltaTimeMS);
                }
            }
        }
 protected void OnLoadZooSceneFinished(Message msg)
 {
     LoadSceneModule();
     GameModuleManager.GetInstance().Run();
 }
 public void UnLoadModule()
 {
     GameModuleManager.GetInstance().Release();
 }