Esempio n. 1
0
        /// <summary>
        /// CD 结束   发送消息
        /// </summary>
        protected void WhenCDFinished()
        {
            var entity = (this.fsmCtr as FSMMachineVisitor).ownerEntity;
            var msg    = EntryGateCheckInCDFinshedApply.Send(entity.entityID, entity.zooEntryID);

            isSendCDFinshed = true;

            if (GlobalData.GlobalDataManager.GetInstance().playerData.playerZoo.isGuide == true)
            {
                UIGuidePage uIGuidePage = PageMgr.GetPage <UIGuidePage>();
                if (uIGuidePage == null)
                {
                    string e = string.Format("新手引导界面  PageMgr.allPages里 UIGuidePage   为空");
                    throw new System.Exception(e);
                }
                if (uIGuidePage.newBieGuild_step == NewBieGuild.Step_15)
                {
                    PageMgr.ShowPage <UIGuidePage>();  //开启新手引导UI
                }
                else if (uIGuidePage.newBieGuild_step < NewBieGuild.Step_15)
                {
                    uIGuidePage.TAEvent_finish();
                    uIGuidePage.newBieGuild_step = NewBieGuild.Step_15;
                    uIGuidePage.TAEvent_start();                     //本阶段显示文本
                    uIGuidePage.TAEvent_process();
                    uIGuidePage.OnClickDialogBoxButton();
                }
            }

            DebugFile.GetInstance().WriteKeyFile(entity.entityID, "{0} WhenCDFinished send {1}", entity.entityID, msg);
        }
Esempio n. 2
0
        public override void Tick(int deltaTimeMS)
        {
            if (!isSendFinished)
            {
                return;
            }

            if (isClosed)
            {
                return;
            }

            waitCD.Tick(deltaTimeMS);

            if (waitCD.IsRunning() && waitCD.IsFinish())
            {
                isClosed = true;
                PageMgr.ClosePage("UILoading");
                //this.fsmCtr.Stop();
                PageMgr.ShowPage <UIMainPage>();
                //var playerData = GlobalDataManager.GetInstance().playerData;
                ////存储当前场景ID
                //playerData.playerZoo.currSceneID = (fsmCtr as FSMGameLoad).sceneID;
            }
        }
Esempio n. 3
0
    protected void OnClickTips(Button obj)
    {
//#if UNITY_EDITOR
//        OnTipsWatchRewardAdSuccessed();
//        return;
//#endif
        if (playerData.leftNumTips > 0)
        {
            --playerData.leftNumTips;
            txtLeftTips.text = playerData.leftNumTips.ToString();
            OnTipsWatchRewardAdSuccessed();
        }

        return;

        if (AdmobManager.GetInstance().isLoaded)
        {
            requestADButUnload = false;
            AdmobManager.GetInstance().UserChoseToWatchAd(OnTipsWatchRewardAdSuccessed);
        }
        else
        {
            requestADButUnload = true;
            PageMgr.ShowPage <UIWaitAd>(5000);
        }
    }
        private void DetectButtonClick()
        {
            if (IsPointerOverUI())
            {
                return;
            }

            if (Input.GetMouseButtonDown(0))
            {
                Ray        ray = sceneCamera.ScreenPointToRay(Input.mousePosition);
                RaycastHit hit;
                if (Physics.Raycast(ray, out hit, 1000f))
                {
                    if (hit.transform == balloonTrans)
                    {
                        miscModel.freeItemAdState = FreeItemAdState.ViewOpened;
                        detectBalloonClick        = false;
                        //PageMgr.ShowPage<UIAdvertTouristPage>("FreeItemButton");
                        PageMgr.ShowPage <UINewCurrencyAdvertPage>(AdTagFM.Add_Viptiming_Advert);

                        PageMgr.GetPage <UINewCurrencyAdvertPage>().onClose.AddListener(OnAdvertTouristPageClose);
                    }
                }
            }
        }
Esempio n. 5
0
        public override void Enter(int preStateName)
        {
            base.Enter(preStateName);
            var follow = (this.fsmCtr as FSMFollowPathSuperMarketSimply).owner;
            var entity = follow.ownerEntity as EntityGroundParkingCar;

            entity.anim.Stop();


            //LogWarp.LogErrorFormat("{0} car StateFollowPathSuperMarketSimply_StayParking {1}, {2}", entity.entityID,
            //    entity.groundParkingGroupID, entity.groundParkingIdx);
            MessageGroundParkingSpace.Send((int)GameMessageDefine.ParkingCarInGroundParking, entity.groundParkingGroupID, entity.groundParkingIdx);
            SpawnVisitorFromGroundParking.Send(VisitorStage.GotoParking, EntityFuncType.Visitor_From_GroundParking,
                                               entity.groundParkingGroupID, entity.groundParkingIdx);

            /*  新手引导阶段  进行步骤4  添加跟随对象   */
            if (GlobalData.GlobalDataManager.GetInstance().playerData.playerZoo.isGuide == true)
            {
                UIGuidePage uIGuidePage = PageMgr.GetPage <UIGuidePage>();
                if (uIGuidePage == null)
                {
                    string e = string.Format("新手引导界面  PageMgr.allPages里 UIGuidePage   为空");
                    throw new System.Exception(e);
                }
                if (uIGuidePage.newBieGuild_step == NewBieGuild.Step_3)
                {
                    PageMgr.ShowPage <UIGuidePage>();  //开启新手引导UI
                    uIGuidePage.entity = entity;
                }
            }
        }
    public void OnClickZoo()
    {
        //判断当前动物栏的等级是否不为0   为0开启新的动物栏
        int litteZooLevel = GlobalDataManager.GetInstance().playerData.GetLittleZooModuleData(int.Parse(nameID)).littleZooTicketsLevel;

        if (litteZooLevel > 0)
        {
            if (GlobalDataManager.GetInstance().playerData.playerZoo.isGuide == true)
            {
                UIGuidePage uIGuidePage = PageMgr.GetPage <UIGuidePage>();
                if (uIGuidePage == null)
                {
                    string e = string.Format("新手引导界面  PageMgr.allPages里 UIGuidePage   为空");
                    throw new System.Exception(e);
                }
                //LogWarp.LogErrorFormat("测试:  新手引导步骤   动物栏点击   {0}  ", uIGuidePage.procedure);
                if (uIGuidePage.newBieGuild_step != NewBieGuild.Step_20)
                {
                    return;
                }
                else
                {  //取消场景特效  进入场景点击事件
                    uIGuidePage.DestroyEffectChild();
                    uIGuidePage.TAEvent_finish();
                    uIGuidePage.TAEvent_start((int)uIGuidePage.newBieGuild_step + 1);
                    uIGuidePage.TAEvent_process((int)uIGuidePage.newBieGuild_step + 1);
                    uIGuidePage.SetCameraOnClickScene(sceneUIButtonPos);
                    //uIGuidePage.TAEvent_finish(1);
                    //uIGuidePage.TAEvent_start(2);
                }
            }
            //LogWarp.LogErrorFormat("ssssssssssssssss      {0}", nameID);
            //显示UI
            PageMgr.ShowPage <UIZooPage>(nameID);  //动物栏UI交互
            iPage = new UIZooPage();
            UITestToolWindowPage uITestToolWindowPage = PageMgr.GetPage <UITestToolWindowPage>();
            if (uITestToolWindowPage != null)
            {
                uITestToolWindowPage.littleZooID = int.Parse(nameID);
            }
            SetMainPageHidePart(gameObject);
        }
        else
        {
            int idx = Config.buildupConfig.getInstace().getCell(nameID).affirmopen;

            if (GlobalDataManager.GetInstance().playerData.playerZoo.isGuide == true)
            {
                return;
            }
            if (idx == 0)
            {
                PromptText.CreatePromptText("Ui_Text_122");
                return;
            }
            PageMgr.ShowPage <UIBuildOpenPage>(nameID);  //开启新的动物园交互
            iPage = new UIBuildOpenPage();
            SetMainPageHidePart(gameObject);
        }
    }
 public void OnClickEntry()
 {
     if (GlobalDataManager.GetInstance().playerData.playerZoo.isGuide == true)
     {
         UIGuidePage uIGuidePage = PageMgr.GetPage <UIGuidePage>();
         if (uIGuidePage == null)
         {
             string e = string.Format("新手引导界面  PageMgr.allPages里 UIGuidePage   为空");
             throw new System.Exception(e);
         }
         if (uIGuidePage.newBieGuild_step != NewBieGuild.Step_12)
         {
             return;
         }
         else
         {  //取消场景特效  进入场景点击事件
             uIGuidePage.DestroyEffectChild();
             uIGuidePage.TAEvent_finish();
             uIGuidePage.TAEvent_start((int)uIGuidePage.newBieGuild_step + 1);
             uIGuidePage.TAEvent_process((int)uIGuidePage.newBieGuild_step + 1);
             uIGuidePage.SetCameraOnClickScene(sceneUIButtonPos);
         }
     }
     PageMgr.ShowPage <UIEntryPage>();  //摆渡车UI交互
     iPage = new UIEntryPage();
     SetMainPageHidePart(gameObject);
 }
        /// <summary>
        /// 是否是新手引导需要的转圈
        /// </summary>
        /// <param name="goLittleZoo"></param>
        /// <param name="littleZooID"></param>
        private static void IsGuidOpenUIBuildShowPage(GameObject goLittleZoo, int littleZooID)
        {
            if (!GlobalDataManager.GetInstance().playerData.playerZoo.isGuide)
            {
                return;
            }

            GlobalDataManager.GetInstance().playerData.playerZoo.BuildShowTransform = goLittleZoo.transform;
            float timeCount = 0.1f;

            DOTween.To(() => timeCount, a => timeCount = a, 0.1f, 0.1f).OnComplete(new TweenCallback(delegate
            {
                PageMgr.ShowPage <UIBuildShowPage>(littleZooID);  //旋转视角UI
            }));
            System.Action action = null;
            action?.Invoke();
            var anim = goLittleZoo.GetComponentInChildren <Animation>();

            if (anim != null)
            {
                SimpleAnimation buildingClickSa = new SimpleAnimation();
                buildingClickSa.Init(anim);
                buildingClickSa.Play(Config.globalConfig.getInstace().BuildClickAnim);
            }
        }
Esempio n. 9
0
    protected void SetAndroidQuit()
    {
#if UNITY_EDITOR
        if (Input.GetKeyDown(KeyCode.Escape))
#else
        if (Application.platform == RuntimePlatform.Android && Input.GetKeyDown(KeyCode.Escape))
#endif
        {
            if (GlobalDataManager.GetInstance().playerData.playerZoo.isGuide)
            {
                return;
            }

            var activePages = PageMgr.GetActivePages();
            if (activePages.Count == 1 && activePages[0].name == "UIMainPage")
            {
                //只有主界面存在,并且点了返回键
                PageMgr.ShowPage <UIQuitGamePage>();
                return;
            }

            foreach (var item in PageMgr.allPages)
            {
                if (item.Key != "UIMainPage")
                {
                    item.Value.Hide();
                }
            }
        }
    }
Esempio n. 10
0
    public void OnLogCallback(string condition, string stackTrace, LogType type)
    {
        //注意!!!!禁止在这里添加任何代码!!!
        if (!isShowException)
        {
            return;
        }

        if (type == LogType.Exception)
        {
            string uiException = condition + "\n\n";
            uiException += stackTrace;
            PageMgr.ShowPage <UIShowException>(uiException);
#if UNITY_EDITOR
            //UnityEditor.EditorApplication.isPlaying = false;
            UnityEditor.EditorApplication.isPaused = true;
            string strTime = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff");
            Debug.LogErrorFormat("{0} 游戏异常中断", strTime);
#else
            if (isExceptionQuit)
            {
                Application.Quit();
            }
#endif
        }
    }
Esempio n. 11
0
        public override void Enter(int preStateName)
        {
            base.Enter(preStateName);

            //ResourceManager.GetInstance().LoadSceneAsync("Stage", LoadSceneFinished, null);
            //PageMgr.ShowPage<UIStage>();
            PageMgr.ShowPage <UILevel2>();
        }
Esempio n. 12
0
        /// <summary>
        /// 小游戏失败
        /// </summary>
        /// <param name="obj"></param>
        private void OnGetCrossRoadGameFailure(Message obj)
        {
            gameModules.Stop();
            //弹出UI  失败
            LogWarp.LogError("游戏失败");

            PageMgr.ShowPage <UIGameFailPage>();
        }
    private void OnClickGoToAnimalPage(int animalID)
    {
        float timeCount = 0.1f;

        DOTween.To(() => timeCount, a => timeCount = a, 0.1f, 0.1f).OnComplete(new TweenCallback(delegate
        {
            PageMgr.ShowPage <UICollectWindowPage>(animalID);  //图鉴入口
        }));
    }
Esempio n. 14
0
    /// <summary>
    /// 动物培养开启功能
    /// </summary>
    /// <param name="obj"></param>
    private void OnClickAdsButton_StrengthenButton(string obj)
    {
        float timeCount = 0.1f;

        DOTween.To(() => timeCount, a => timeCount = a, 0.1f, 0.1f).OnComplete(new TweenCallback(delegate
        {
            PageMgr.ShowPage <UIAnimalTipsPage>();
        }));
    }
Esempio n. 15
0
    /// <summary>
    /// 图鉴入口
    /// </summary>
    /// <param name="obj"></param>
    private void OnClickCollectButton(string obj)
    {
        float timeCount = 0.1f;

        DOTween.To(() => timeCount, a => timeCount = a, 0.1f, 0.1f).OnComplete(new TweenCallback(delegate
        {
            PageMgr.ShowPage <UIAnimalAtlasPage>();  //图鉴入口
        }));
    }
Esempio n. 16
0
    /// <summary>
    /// 观看广告   加倍收益   UIAdvertActivity
    /// </summary>
    /// <param name="obj"></param>
    private void OnClickAdvertButton(string obj)
    {
        float timeCount = 0.1f;

        DOTween.To(() => timeCount, a => timeCount = a, 0.1f, 0.1f).OnComplete(new TweenCallback(delegate
        {
            //PageMgr.ShowPage<UIAdvertActivityPage>(obj);  //加倍收益
            PageMgr.ShowPage <UINewCurrencyAdvertPage>(AdTagFM.Add_Double_Advert);
        }));
    }
        public override void Enter(int preStateName)
        {
            base.Enter(preStateName);
            var entity = (this.fsmCtr as FSMMachineVisitor).ownerEntity;

            DebugFile.GetInstance().WriteKeyFile(entity.entityID, "{0} StateVisitorStayVisitSeat.Enter", entity.entityID);
            DebugFile.GetInstance().MarkGameObject(entity.mainGameObject, "visitor_{0}_{1}_{2}", entity.entityID, (VisitorState)this.preStateName, (VisitorState)this.stateName);

            isToVisitorStateChoseLittleZoo    = false;
            isToStateVisitorLeaveNonLittleZoo = false;
            shouldImmediateFinishVisitCD      = false;

            effID = Const.Invalid_Int;
            effGo = null;

            isRevCDVal = false;
            if (visitCD != null)
            {
                visitCD.Stop();
            }

            // LogWarp.LogFormat("-->Visitor enter tour state: littleZooId ={0}visitorId ={1}", entity.stayBuildingID, entity.entityID);
            // 观光游客面朝动物栏中心
            entity.LookAt(LittleZooPosManager.GetInstance().GetPos(entity.stayBuildingID));

            MessageManager.GetInstance().Regist((int)GameMessageDefine.LittleZooDataReply, OnLittleZooDataReply);
            MessageManager.GetInstance().Regist((int)GameMessageDefine.VisitorVisitCDFinshedReply, OnVisitorVisitCDFinshedReply);
            MessageManager.GetInstance().Regist((int)GameMessageDefine.ImmediateFinishVisitCD, OnImmediateFinishVisitCD);

            //模型到达动物栏等待位   调用新手引导的内容  显示步骤16
            if (GlobalDataManager.GetInstance().playerData.playerZoo.isGuide == true)
            {
                UIGuidePage uIGuidePage = PageMgr.GetPage <UIGuidePage>();
                if (uIGuidePage == null)
                {
                    string e = string.Format("新手引导界面  PageMgr.allPages里 UIGuidePage   为空");
                    throw new System.Exception(e);
                }
                //LogWarp.LogError("测试:     uIGuidePage.procedure=      " + uIGuidePage.procedure);
                if (uIGuidePage.newBieGuild_step == NewBieGuild.Step_16)
                {
                    uIGuidePage.TAEvent_finish();
                    uIGuidePage.newBieGuild_step = NewBieGuild.Step_17;
                    uIGuidePage.TAEvent_start();                     //本阶段显示文本
                    uIGuidePage.TAEvent_process();
                    uIGuidePage.OnClickDialogBoxButton();
                }
                else if (uIGuidePage.newBieGuild_step == NewBieGuild.Step_17)
                {
                    PageMgr.ShowPage <UIGuidePage>();  //开启新手引导UI
                }
            }
            //进入这个状态开始计算游览cd
            LittleZooData.Send(entity.entityID, entity.stayBuildingID);
        }
Esempio n. 18
0
        protected void SetAndroidQuit()
        {
#if UNITY_EDITOR
            if (Input.GetKeyDown(KeyCode.Escape))
#else
            if (Application.platform == RuntimePlatform.Android && Input.GetKeyDown(KeyCode.Escape))
#endif
            {
                PageMgr.ShowPage <UIQuitGamePage>();
            }
        }
Esempio n. 19
0
        public override void Enter(int preStateName)
        {
            base.Enter(preStateName);
            var entity = (this.fsmCtr as FSMMachineVisitor).ownerEntity;

            DebugFile.GetInstance().WriteKeyFile(entity.entityID, "{0} StateVisitorStayFirstPosInEntryQueue.Enter", entity.entityID);
            DebugFile.GetInstance().MarkGameObject(entity.mainGameObject, "visitor_{0}_{1}_{2}", entity.entityID, (VisitorState)this.preStateName, (VisitorState)this.stateName);

            DebugFile.GetInstance().WriteKeyFile(entity.entityID, "{0} Play {1}", entity.entityID, Config.globalConfig.getInstace().VisitorIdle);
            entity.PlayActionAnim(Config.globalConfig.getInstace().VisitorIdle);
            isToVisitorStateChoseLittleZoo          = false;
            shouldImmediateFinishEntryGateCheckInCD = false;

            accumulativeUpdateUITime = 0;

            if (checkInCD != null)
            {
                checkInCD.Stop();
            }

            isRecvCDVal     = false;
            isSendCDFinshed = false;
            MessageManager.GetInstance().Regist((int)GameMessageDefine.GetEntryGateDataReply, OnGetEntryGateDataReply);
            MessageManager.GetInstance().Regist((int)GameMessageDefine.EntryGateCheckInCDFinshedReply, OnEntryGateCheckInCDFinshedReply);
            MessageManager.GetInstance().Regist((int)UFrameBuildinMessage.Arrived, this.OnArrived);
            MessageManager.GetInstance().Regist((int)GameMessageDefine.ImmediateFinishEntryGateCheckInCD, OnImmediateFinishEntryGateCheckInCD);
            /*   模型到达售票口   调用新手引导的内容  显示步骤10   */
            if (GlobalDataManager.GetInstance().playerData.playerZoo.isGuide == true)
            {
                UIGuidePage uIGuidePage = PageMgr.GetPage <UIGuidePage>();
                if (uIGuidePage == null)
                {
                    string e = string.Format("新手引导界面  PageMgr.allPages里 UIGuidePage   为空");
                    throw new System.Exception(e);
                }
                if (uIGuidePage.newBieGuild_step == NewBieGuild.Step_10)
                {
                    PageMgr.ShowPage <UIGuidePage>();
                }
                else if (uIGuidePage.newBieGuild_step == NewBieGuild.Step_9)
                {
                    uIGuidePage.TAEvent_finish();
                    uIGuidePage.newBieGuild_step = NewBieGuild.Step_10;
                    uIGuidePage.TAEvent_start((int)uIGuidePage.newBieGuild_step);                     //本阶段显示文本
                    uIGuidePage.TAEvent_process((int)uIGuidePage.newBieGuild_step);
                    uIGuidePage.OnClickDialogBoxButton();
                }
            }

            //进入这个状态开始计算游览cd
            GetEntryGateDataApply.Send(entity.entityID, entity.zooEntryID);
        }
Esempio n. 20
0
        private void PositionToTask(int taskId)
        {
            Config.missionCell missionCell = missionModel.GetTaskCell(taskId);
            if (missionCell != null && missionCell.skip > 0)
            {
                int progress, goal;
                missionModel.GetTaskProgress(taskId, out progress, out goal);
                if (progress < 1 && missionCell.ParseTaskType() == TaskType.LittleZooLevelup) // 此动物栏还未开启
                {
                    return;
                }

                CloseOthersPageAndTaskPanel();

                TaskType taskType   = missionCell.ParseTaskType();
                int      buildingId = missionCell.GetBuildingId();
                if (taskType == TaskType.ParkingLevelup)
                {
                    PageMgr.ShowPage <UIParkPage>();
                    UIInteractive.GetInstance().iPage = new UIParkPage();
                    PostionSceneTo(GlobalDataManager.GetInstance().zooGameSceneData.GetParkingFocusPoint(buildingId));
                }
                else if (taskType == TaskType.EntryGateLevelup)
                {
                    PageMgr.ShowPage <UIEntryPage>();
                    UIInteractive.GetInstance().iPage = new UIEntryPage();
                    PostionSceneTo(GlobalDataManager.GetInstance().zooGameSceneData.GetEntryGateGroupFocusPoint());
                }
                else if (taskType == TaskType.LittleZooLevelup)
                {
                    PageMgr.ShowPage <UIZooPage>(buildingId);
                    UIInteractive.GetInstance().iPage = new UIZooPage();
                    PostionSceneTo(GlobalDataManager.GetInstance().zooGameSceneData.GetLittleZooFocusPoint(buildingId));
                }
                else if (taskType == TaskType.LittleZooVisit)
                {
                    // 不跳转
                }
                else if (taskType == TaskType.AdWatch)
                {
                    //PageMgr.ShowPage<UIAdvertActivityPage>();

                    PageMgr.ShowPage <UINewCurrencyAdvertPage>(AdTagFM.Add_Double_Advert);
                }
                else if (taskType == TaskType.OpenNewLittleZoo)
                {
                    PageMgr.ShowPage <UIBuildOpenPage>(buildingId);  //开启新的动物园交互
                    UIInteractive.GetInstance().iPage = new UIZooPage();
                    PostionSceneTo(GlobalDataManager.GetInstance().zooGameSceneData.GetLittleZooFocusPoint(buildingId));
                }
            }
        }
 private void OnClickBtnADTest(string str)
 {
     if (AdmobManager.GetInstance().isLoaded)
     {
         requestADButUnload = false;
         AdmobManager.GetInstance().UserChoseToWatchAd(OnWatchRewardAdSuccessed_Test);
     }
     else
     {
         requestADButUnload = true;
         PageMgr.ShowPage <UIWaitAd>(5000);
     }
 }
Esempio n. 22
0
 protected void OnClickedAD(Button obj)
 {
     if (AdmobManager.GetInstance().isLoaded)
     {
         requestADButUnload = false;
         AdmobManager.GetInstance().UserChoseToWatchAd(OnTipsWatchRewardAdSuccessed);
     }
     else
     {
         requestADButUnload = true;
         PageMgr.ShowPage <UIWaitAd>(5000);
     }
 }
    protected void OnClickTestButton01(string str)
    {
        //OnTestBuffReturn();
        // OnTestItemData();
        //OnTestModificationSceneData();
        //ZooGameLoader.GetInstance().ChangeScene(0);

        //OnTestMultiIntCD();

        PageMgr.ShowPage <UITestToolWindowPage>();
        //LogWarp.LogError("   点击了   ");
        //OnTestMultiIntCD();
    }
 void ShowAD()
 {
     if (AdmobManager.GetInstance().isLoaded)
     {
         requestADButUnload = false;
         AdmobManager.GetInstance().UserChoseToWatchAd(Next);
     }
     else
     {
         requestADButUnload = true;
         PageMgr.ShowPage <UIWaitAd>(5000);
     }
 }
Esempio n. 25
0
        public void Load(int stageID)
        {
            if (stageID < 0 || stageID > Config.crossroadstageConfig.getInstace().RowNum)
            {
                string e = string.Format("过马路关卡数不正确 {0}", stageID);
                throw new System.Exception(e);
            }

            CrossRoadModelManager.GetInstance().stageID = stageID;
            PageMgr.CloseAllPage(true, "");
            PageMgr.ShowPage <UICrossRoadLoading>();
            SetFSM("UICrossRoadLoading");
            LoadModule();
        }
        /// <summary>
        /// 小游戏失败
        /// </summary>
        /// <param name="obj"></param>
        private void OnGetCrossRoadGameFailure(Message obj)
        {
            gameModules.Stop();

            //float timeCount = 0.1f;
            //DOTween.To(() => timeCount, a => timeCount = a, 0.1f, timeLapseFailPage).OnComplete(new TweenCallback(delegate
            //{
            //    PageMgr.ShowPage<UIGameFailPage>();

            //}));

            PageMgr.ShowPage <UIGameFailPage>();
            //弹出UI  失败
            LogWarp.LogError("游戏失败");
        }
    /// <summary>
    /// 监听广播停车场停车位数量等级
    /// </summary>
    /// <param name="obj"></param>
    private void OnGetBroadcastParkingSpaceLevelOfPlayerData(Message obj)
    {
        this.InitData();

        if (GlobalDataManager.GetInstance().playerData.playerZoo.isGuide == true && parkingSpaceLevel == 2)
        {   /*新手阶段   隐藏停车场Ui  显示新手引导UI    步骤应该是  7    */
            DestroyEffectChild();
            this.Hide();
            PageMgr.ShowPage <UIGuidePage>();
        }
        if (GlobalDataManager.GetInstance().playerData.playerZoo.isGuide == true)
        {
            PromptText.CreatePromptText_TestUI(string.Format(GetL10NString("Ui_Text_134"), parkingSpaceLevel, 2));
        }
        isGetCoin = true;
    }
        /// <summary>
        /// 动物升级对应的动物展示旋转
        /// </summary>
        /// <param name="animalID"></param>
        private static void GetShowUIReceivePage(int animalID)
        {
            //关于Ui等级打点(在旋转相机的时候)
            UIZooPage uIZooPage = PageMgr.GetPage <UIZooPage>();

            if (uIZooPage != null)
            {
                uIZooPage.OnGetBroadcastLittleZooTicketsLevelPlayerData(null);
                uIZooPage.Hide();
            }

            var resourceID = Config.animalupConfig.getInstace().getCell(animalID).resourceload;

            //旋转视角UI
            PageMgr.ShowPage <UIReceivePage>(resourceID);
            MessageString.Send((int)GameMessageDefine.UIMessage_ActiveButHidePart, "UIMainPage");
        }
    /// <summary>
    /// 监听售票口的门票等级
    /// </summary>
    /// <param name="msg"></param>
    protected void OnGetBroadcastEntryGateLevelOfPlayerData(Message msg)
    {
        //刷新售票口的UI显示
        this.InitData();

        if (GlobalDataManager.GetInstance().playerData.playerZoo.isGuide == true && entryTicketsLevel >= 5)
        {   /*新手阶段   隐藏停车场Ui  显示新手引导UI    步骤应该是  14    */
            DestroyEffectChild();
            InitNewGuideEveryCompent();
            this.Hide();
            PageMgr.ShowPage <UIGuidePage>();
        }
        if (GlobalDataManager.GetInstance().playerData.playerZoo.isGuide == true)
        {
            PromptText.CreatePromptText_TestUI(string.Format(GetL10NString("Ui_Text_136"), entryTicketsLevel, 5));
        }
        isGetCoin = true;
    }
        public void Load(int stageID)
        {
            if (stageID < 0)
            {
                string e = string.Format("过马路关卡数不正确 {0}", stageID);
                throw new System.Exception(e);
            }
            else if (stageID >= Config.crossroadstageConfig.getInstace().RowNum)
            {
                int number = Config.crossroadstageConfig.getInstace().RowNum;
                stageID = Config.crossroadstageConfig.getInstace().getCell(number).level;
            }
            GameSoundManager.GetInstance().PlayBGMusicAsync(Config.globalConfig.getInstace().ZooSceneBGM);

            CrossRoadModelManager.GetInstance().stageID = stageID;
            PageMgr.CloseAllPage(true, "");
            PageMgr.ShowPage <UICrossRoadLoading>();
            SetFSM("UICrossRoadLoading");
            LoadModule();
        }