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);
        }
    }
Example #2
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;
                }
            }
        }
Example #3
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);
        }
 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>
    private void DelayedOperationNewbieGuideStage()
    {
        //根据新手引导阶段的步骤显示对应的特效和隐藏对应的按钮点击事件
        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_20)
        {
            //停车场停车位按钮处显示小手点击动画
            effectNode = tickets_Button.transform.Find("effectNode");
            Transform trans = null;
            trans = ResourceManager.GetInstance().LoadGameObject(Config.globalConfig.getInstace().GuideUiClickEffect).transform;
            trans.SetParent(effectNode, true);
            trans.localScale    = UnityEngine.Vector3.one;
            trans.position      = effectNode.position;
            trans.localPosition = new UnityEngine.Vector3(
                trans.localPosition.x,
                trans.localPosition.y + 4,
                trans.localPosition.z);
        }
    }
    protected void OnClickedNextLevel(string objName)
    {
        PageMgr.ClosePage(this);
        var level = PageMgr.GetPage <UILevel2>();

        level.GenLevel(true);
    }
        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);
                    }
                }
            }
        }
Example #8
0
    private IEnumerator FinishMoneyEffect()
    {
        yield return(new WaitForSeconds(0.1f));

        UIMainPage uIMainPage = PageMgr.GetPage <UIMainPage>();

        uIMainPage.OnMoneyEffect();//飘钱特效
    }
        /// <summary>
        /// 收到设置售票口的门票等级升级的消息
        /// </summary>
        /// <param name="msg"></param>
        protected void OnSetEntryGateLevelOfPlayerData(Message msg)
        {
            var _msg = msg as SetDetailValueOfPlayerData;
            int entryTicketsLevel = GlobalDataManager.GetInstance().playerData.GetEntryDateDataIDIndexOfDataIdx().entryTicketsLevel;

            if ((entryTicketsLevel + _msg.detailVal) > ticketCell.lvmax)
            {
                return;
            }
            // 涉及金币减扣
            BigInteger bigDelta = EntryGateModule.GetUpGradeConsumption(entryTicketsLevel, _msg.detailVal);

            //bool retCode = VaryDataCoin(bigDelta);
            //if (!retCode)
            //{
            //    //string e = string.Format("售票口门票升级扣钱失败");
            //    //throw new System.Exception(e);
            //    return;
            //}

            //BroadcastValueOfPlayerData.Send((int)GameMessageDefine.BroadcastCoinOfPlayerData,
            //   0, 0, BigInteger.Parse(GlobalDataManager.GetInstance().playerData.playerZoo.coin), bigDelta);

            if (!playerData.playerZoo.playerCoin.WarpAddCoin(playerData, -bigDelta))
            {
                return;
            }

            this.playerData.GetEntryDateDataIDIndexOfDataIdx().entryTicketsLevel += _msg.detailVal;
            BroadcastValueOfPlayerData.Send((int)GameMessageDefine.BroadcastEntryGateLevelOfPlayerData, this.playerData.GetEntryDateDataIDIndexOfDataIdx().entryTicketsLevel, _msg.deltaVal, 0, 0);
            BuildingLevelup.Send((int)BuildingTypeFM.EntryGate, -1, (int)EntryGateProperty.TicketPrice, this.playerData.GetEntryDateDataIDIndexOfDataIdx().entryTicketsLevel);

            //收集星星:
            var sortEntryGateIDs = GlobalDataManager.GetInstance().logicTableEntryGate.GetSortGateIDs(currSceneID);
            var lvshage          = Config.ticketConfig.getInstace().getCell(sortEntryGateIDs[0]).lvshage;
            int idx        = FindLevelRangIndex01(lvshage, this.playerData.GetEntryDateDataIDIndexOfDataIdx().entryTicketsLevel);
            int stageLevel = Config.ticketConfig.getInstace().getCell(sortEntryGateIDs[0]).lvshage[idx];

            if (this.playerData.GetEntryDateDataIDIndexOfDataIdx().entryTicketsLevel == stageLevel)
            {
                int awardType = Config.ticketConfig.getInstace().getCell(sortEntryGateIDs[0]).lvrewardtype[idx];
                int awardID   = Config.ticketConfig.getInstace().getCell(sortEntryGateIDs[0]).lvreward[idx];
                var cell      = Config.itemConfig.getInstace().getCell(awardID);
                if (awardType == 1)
                {
                    //发放奖励道具
                    MessageInt.Send((int)GameMessageDefine.GetItem, awardID);
                    if (cell.itemtype == 2)
                    {
                        PageMgr.GetPage <UIMainPage>().OnMoneyEffect();
                    }
                    //LogWarp.LogErrorFormat("售票口 当前等级为{0},可以发放奖励道具{1}", stageLevel, awardID);
                }
                //发放星星
                MessageInt.Send((int)GameMessageDefine.GetItem, 4);
                //LogWarp.LogErrorFormat("售票口 当前等级为{0},可以发放星星", stageLevel);
            }
        }
Example #10
0
        private void OnPlayerStarCountChanged(Message message)
        {
            mapModel.HandlePlayerStarCountChange();
            UIMapPage mapPage = PageMgr.GetPage <UIMapPage>();

            if (mapPage != null)
            {
                mapPage.UpdatePieceStatesDisplay();
            }
        }
    private void HideUICallBack()
    {
        float timeCount = 0.1f;

        DOTween.To(() => timeCount, a => timeCount = a, 0.1f, 0.1f).OnComplete(new TweenCallback(delegate
        {
            UIMainPage uIMainPage = PageMgr.GetPage <UIMainPage>();
            uIMainPage.OnMoneyEffect();//飘钱特效
        }));
    }
        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);
        }
Example #13
0
        private IEnumerator AfterTaskRewardReceived()
        {
            UIMainPage mainPage = PageMgr.GetPage <UIMainPage>();

            if (mainPage != null)
            {
                mainPage.OnMoneyEffect();
            }
            yield return(new UnityEngine.WaitForSeconds(0.2f));

            NextTask(missionModel.currTaskId);
        }
Example #14
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);
        }
Example #15
0
 private void OnApplicationPauseOnResume(bool isPause)
 {
     if (!isPause)
     {
         if (PageMgr.allPages != null)
         {
             UIMainPage mainPage = PageMgr.GetPage <UIMainPage>();
             if (mainPage != null)
             {
                 mainPage.OpenGuideTaskPanel();
             }
         }
     }
 }
    private void OnConfirmButtonClick(string str)
    {
        mapModel.BrowseScene(int.Parse(m_data.ToString()));
        var mapPage = PageMgr.GetPage <UIMapPage>();

        mapPage.UpdatePieceStatesDisplay();
        var mainPage = PageMgr.GetPage <UIMainPage>();

        if (mainPage != null)
        {
            mainPage.UpdateDisplayForSceneStates();
        }
        PageMgr.ClosePage(this);
    }
Example #17
0
        /// <summary>
        /// 停车场的等级升级(利润)
        /// </summary>
        /// <param name="msg"></param>
        protected void OnSetParkingProfitLevelOfPlayerData(Message msg)
        {
            var _msg = msg as SetDetailValueOfPlayerData;

            parkingCenterData = playerData.GetParkingCenterDataIDIndexOfDataIdx(currSceneID);
            int parkingProfitLevel = parkingCenterData.parkingProfitLevel;

            if ((parkingProfitLevel + _msg.detailVal) > parkingCell.lvmax)
            {
                return;
            }
            BigInteger bigDelta = ParkingCenter.GetUpGradeParkingProfitConsumption(parkingProfitLevel, _msg.detailVal);

            if (!playerData.playerZoo.playerCoin.WarpAddCoin(playerData, -bigDelta))
            {
                return;
            }

            int needLevel = parkingProfitLevel + _msg.detailVal;

            this.playerData.GetParkingCenterDataIDIndexOfDataIdx(currSceneID).parkingProfitLevel = needLevel;
            BroadcastValueOfPlayerData.Send((int)GameMessageDefine.BroadcastParkingProfitLevelOfPlayerData,
                                            this.playerData.GetParkingCenterDataIDIndexOfDataIdx(currSceneID).parkingProfitLevel, _msg.detailVal, 0, 0);
            BuildingLevelup.Send((int)BuildingTypeFM.Parking, 999, (int)ParkingProperty.Revenue, this.playerData.GetParkingCenterDataIDIndexOfDataIdx(currSceneID).parkingProfitLevel);

            //收集星星:
            var lvshage    = parkingCell.lvshage;
            int idx        = FindLevelRangIndex01(lvshage, this.playerData.GetParkingCenterDataIDIndexOfDataIdx(currSceneID).parkingProfitLevel);
            int stageLevel = parkingCell.lvshage[idx];

            if (this.playerData.GetParkingCenterDataIDIndexOfDataIdx(currSceneID).parkingProfitLevel == stageLevel)
            {
                int awardType = parkingCell.lvrewardtype[idx];
                int awardID   = parkingCell.lvreward[idx];
                var cell      = Config.itemConfig.getInstace().getCell(awardID);
                if (awardType == 1)
                {
                    //发放奖励道具
                    MessageInt.Send((int)GameMessageDefine.GetItem, awardID);
                    if (cell.itemtype == 2)
                    {
                        PageMgr.GetPage <UIMainPage>().OnMoneyEffect();
                    }
                }
                //发放星星
                MessageInt.Send((int)GameMessageDefine.GetItem, 4);
            }
        }
        /// <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");
        }
Example #19
0
        private bool IsOnlyMainPageShowing()
        {
            UIMainPage mainPage = PageMgr.GetPage <UIMainPage>();

            foreach (var p in PageMgr.allPages.Values)
            {
                if (p == mainPage)
                {
                    continue;
                }
                if (p.gameObject.activeSelf)
                {
                    return(false);
                }
            }
            return(mainPage.gameObject.activeSelf);
        }
Example #20
0
        private void CloseOthersPageAndTaskPanel()
        {
            foreach (var page in PageMgr.allPages.Values)
            {
                if (page is UIMainPage)
                {
                    continue;
                }
                PageMgr.ClosePage(page);
            }

            UIMainPage mainPage = PageMgr.GetPage <UIMainPage>();

            if (mainPage != null)
            {
                mainPage.CloseGuideTaskPanel();
            }
        }
Example #21
0
        /// <summary>
        /// 延时,新手引导阶段的相机跟随赋值
        /// </summary>
        private void DelayedOperationNewbieGuideStage(EntityGroundParkingCar entity)
        {
            float timeCount = 0.1f;

            DOTween.To(() => timeCount, a => timeCount = a, 0.1f, 0.1f).OnComplete(new TweenCallback(delegate
            {
                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_2 && uIGuidePage.number == 0)
                {
                    uIGuidePage.entity = entity;
                }
            }));
        }
        protected void OnAddVisitorToEntryQueueApply(Message msg)
        {
            var _msg = msg as AddVisitorToEntryQueueApply;

            LogWarp.LogFormat("{0} EntryGateModule recv {1}", _msg.entityID, _msg);
            DebugFile.GetInstance().WriteKeyFile(_msg.entityID, "{0} EntryGateModule recv {1}", _msg.entityID, _msg);

            EntryGate entryGate = null;

            if (!this.entryGates.TryGetValue(_msg.entryID, out entryGate))
            {
#if UNITY_EDITOR
                string e = string.Format("{0} 找不到入口ID {1}", _msg.entityID, _msg.entryID);
                throw new System.Exception(e);
#endif
            }

            int indexInQueue = entryGate.AddVisitorToQueue(_msg.entityID);
#if UNITY_EDITOR
            if (indexInQueue == Const.Invalid_Int)
            {
                string e = string.Format("{0} AddVisitorToQueue {1} 失败", _msg.entityID, _msg.entryID);
                throw new System.Exception(e);
            }
#endif
            AddVisitorToEntryQueueReply.Send(_msg.entityID, indexInQueue);
            if (_msg.entryID == 0 && GlobalDataManager.GetInstance().playerData.playerZoo.isGuide == true)
            {
                UIGuidePage uIGuidePage = PageMgr.GetPage <UIGuidePage>();
                if (uIGuidePage != null && uIGuidePage.newBieGuild_step <= NewBieGuild.Step_10)
                {
                    entryGate.checkInCDVal = (int)Config.globalConfig.getInstace().GuideTouristSpeed *1000;
                }
                else
                {
                    entryGate.checkInCDVal = GetCheckinCDValMs(0, 1);
                }
            }
        }
Example #23
0
    private void SetSceneStateData(int pieceId)
    {
        ScenePlayerDataMSS.SceneStateMSS sceneState = mapModel.GetSceneState(pieceId);
        bool unlocked = sceneState != null ? sceneState.unlocked > 0 : false;
        bool broswed  = sceneState != null ? sceneState.browsed > 0 : false;

        if (unlocked && !broswed)
        {
            //mapModel.BrowseScene(pieceId);
            //UpdatePieceStatesDisplay();
            //var mainPage = PageMgr.GetPage<UIMainPage>();
            //if (mainPage != null)
            //    mainPage.UpdateDisplayForSceneStates();
            PageMgr.ShowPage <UISceneUnlockPage>(pieceId);
            PageMgr.GetPage <UISceneUnlockPage>().onClose.AddListener(OnSceneUnlockPageClose);
        }
        else
        {
            enterSceneButton.gameObject.SetActive(false);

            //pieceInfoHint.gameObject.SetActive(false);

            if (pieceInfoHintAnimCoroutine != null)
            {
                GameManager.GetInstance().StopCoroutine(pieceInfoHintAnimCoroutine);
                pieceInfoHintAnimCoroutine = null;
            }
            var playerData = GlobalDataManager.GetInstance().playerData;
            int idx        = PlayerData.GetcurrSceneIDByStar(playerData);
            ///回退    老场景不可点击
            //if (sceneState != null && sceneState.sceneId == idx)
            //{
            //    enterSceneButton.gameObject.SetActive(unlocked && broswed && mapModel.currSceneId != selectedPieceId);
            //}
            enterSceneButton.gameObject.SetActive(unlocked && broswed && mapModel.currSceneId != selectedPieceId);

            pieceInfoHintAnimCoroutine = GameManager.GetInstance().StartCoroutine(FinishShowPieceInfoHint(pieceId));
        }
    }
Example #24
0
        protected void OnLetGroundParingCarLeave(Message msg)
        {
            var _msg         = msg as MessageGroundParkingSpace;
            var parkingSpace = this.groundParking.GetSpace(_msg.groupID, _msg.idx);

            this.numShowParking++;
            ShowLeftParkingNum(numShowParking);
            parkingSpace.SetFree();


            /*强制关闭新手引导*/
            if (GlobalData.GlobalDataManager.GetInstance().playerData.playerZoo.isGuide)
            {
                UIGuidePage uIGuidePage = PageMgr.GetPage <UIGuidePage>();
                if (uIGuidePage == null)
                {
                    string e = string.Format("新手引导界面  PageMgr.allPages里 UIGuidePage   为空");
                    throw new System.Exception(e);
                }
                uIGuidePage.newBieGuild_step = NewBieGuild.Step_25;
                uIGuidePage.OnClickDialogBoxButton();
            }
        }
    private void RegistAllCompent()
    {
        GameObject camera = GlobalDataManager.GetInstance().zooGameSceneData.camera;

        //查找选择的相机
        rotationCamera = camera.transform.Find("RotationCamera");
        mainCamera     = camera.transform.Find("main_camera");
        buttonHide     = AddCompentInChildren <Button>(buttonHide, "UIBg/UIShowGroup/OkButton");
        buttonHide     = RegistBtnAndClick("UIBg/UIShowGroup/OkButton", HideUI);
        buttonText     = RegistCompent <Text>("UIBg/UIShowGroup/OkButton/ButtonText");
        //GetTransPrefabText(buttonText);

        //新手引导手势组件
        effectNode = RegistCompent <Transform>("UIBg/UIShowGroup/OkButton/effectNode");
        if (GlobalDataManager.GetInstance().playerData.playerZoo.isGuide == true)
        {
            Transform trans = null;
            trans = ResourceManager.GetInstance().LoadGameObject(Config.globalConfig.getInstace().GuideUiClickEffect).transform;
            trans.SetParent(effectNode, true);
            trans.localScale    = UnityEngine.Vector3.one;
            trans.position      = effectNode.position;
            trans.localPosition = new UnityEngine.Vector3(
                trans.localPosition.x,
                trans.localPosition.y + 4,
                trans.localPosition.z);
            UIGuidePage uIGuidePage = PageMgr.GetPage <UIGuidePage>();
            if (uIGuidePage == null)
            {
                string e = string.Format("新手引导界面  PageMgr.allPages里 UIGuidePage   为空");
                throw new System.Exception(e);
            }
            uIGuidePage.TAEvent_finish((int)uIGuidePage.newBieGuild_step + 1);
            uIGuidePage.TAEvent_start((int)uIGuidePage.newBieGuild_step + 2);
            uIGuidePage.TAEvent_process((int)uIGuidePage.newBieGuild_step + 2);
        }
    }
Example #26
0
        private void CheckTaskForUI()
        {
            if (!inited || isAllTaskCleared)
            {
                return;
            }

            checkDeltaTime += Time.deltaTime;
            if (checkDeltaTime >= checkInterval)
            {
                checkDeltaTime = 0;
                if (isCurrTaskComplete)
                {
                    UIMainPage mainPage = PageMgr.GetPage <UIMainPage>();
                    if (mainPage != null && IsOnlyMainPageShowing())
                    {
                        if (!mainPage.lastCloseWithManual)
                        {
                            mainPage.OpenGuideTaskPanel();
                        }
                    }
                }
            }
        }
Example #27
0
    /// <summary>
    /// 控件显示赋值
    /// </summary>
    private void InitCompent()
    {
        //LogWarp.LogError(" 测试:   InitCompent   ");

        if (maxGrade >= parkingProfitMaxGrade)
        {
            maxGrade = parkingProfitMaxGrade;
        }

        lvText.text       = string.Format(GetL10NString("Ui_Text_2"), profitLevel.ToString());
        gradeSlider.value = AddPercentage(profitLevel - oldMaxGrade, maxGrade - oldMaxGrade);
        gradeText_2.text  = profitLevel.ToString() + "/" + maxGrade.ToString(); //最大等级上限
        //获取UI image =
        Config.itemCell itemCell = GradeSliderAwardImage();
        gradeSlider_Image.sprite = ResourceManager.LoadSpriteFromPrefab(itemCell.icon);

        gradeSlider_Text.text     = MinerBigInt.ToDisplay(itemCell.itemval);
        scoreNumTest.text         = starLevelReached + "/" + parkingCell.starsum;
        profitCoins_Text_2.text   = ParkingCenter.GetParkingProfit(profitLevel).ToString() + "%";//a.ToString("#0.0")
        profitCoins_Text_3.text   = "+" + ParkingCenter.GetParkingProfit(profitLevel, 1).ToString() + "%";
        profitCoins_LvText.text   = profitLevel.ToString();
        parkingSpace_Text2.text   = ParkingCenter.GetParkingSpace(parkingSpaceLevel).ToString();
        parkingSpace_Text3.text   = "+" + (ParkingCenter.GetParkingSpace(parkingSpaceLevel, 1)).ToString();
        parkingSpace_LvText.text  = parkingSpaceLevel.ToString();
        enterCarSpawn_Text2.text  = ParkingCenter.GetParkingEnterCarSpawn_UI(enterCarSpawnLevel).ToString("f2") + GetL10NString("Ui_Text_67");
        enterCarSpawn_Text3.text  = "+" + ParkingCenter.GetParkingEnterCarSpawn(enterCarSpawnLevel, 1).ToString("f2");
        enterCarSpawn_LvText.text = enterCarSpawnLevel.ToString();

        profitCoins_Button_NeedGoldNum.text    = MinerBigInt.ToDisplay(consumeProfitCoins).ToString();    //升级模式需要的金钱
        profitCoins_Button_ButtonLvUpText.text = GetL10NString("Ui_Text_7");

        parkingSpace_Button_NeedGoldNum.text    = MinerBigInt.ToDisplay(consumeParkingSpaceCoins).ToString();    //升级模式需要的金钱
        parkingSpace_Button_ButtonLvUpText.text = GetL10NString("Ui_Text_7");

        enterCarSpawn_Button_NeedGoldNum.text    = MinerBigInt.ToDisplay(consumeEnterCarSpawnCoins).ToString();    //升级模式需要的金钱
        enterCarSpawn_Button_ButtonLvUpText.text = GetL10NString("Ui_Text_7");

        SetGradeBool_Profit();
        SetGradeBool_ParkingSpace();
        SetGradeBool_EnterCarSpawn();
        if (profitLevel >= parkingProfitMaxGrade)
        {
            profitCoins_Button_NeedGoldNum.text    = GetL10NString("Ui_Text_47"); //升级模式需要的金钱
            profitCoins_Button_ButtonLvUpText.text = GetL10NString("Ui_Text_46"); //升级模式要升的级数
            lvText.text             = parkingCell.lvmax.ToString();               //等级text
            profitCoins_Text_3.text = GetL10NString("Ui_Text_47");                //价格变化标签
            SwitchButtonUnClickable(profitCoins_Button, false);
        }
        if (parkingSpaceLevel >= parkingSpaceMaxGrade)
        {
            parkingSpace_Button_NeedGoldNum.text    = GetL10NString("Ui_Text_47"); //升级模式需要的金钱
            parkingSpace_Button_ButtonLvUpText.text = GetL10NString("Ui_Text_46"); //升级模式要升的级数
            parkingSpace_Text3.text = GetL10NString("Ui_Text_47");                 //数量变化标签
            SwitchButtonUnClickable(parkingSpace_Button, false);
        }
        if (enterCarSpawnLevel >= parkingEnterCarSpawnMaxGrade)
        {
            enterCarSpawn_Button_NeedGoldNum.text    = GetL10NString("Ui_Text_47"); //升级模式需要的金钱
            enterCarSpawn_Button_ButtonLvUpText.text = GetL10NString("Ui_Text_46"); //升级模式要升的级数
            enterCarSpawn_Text3.text = GetL10NString("Ui_Text_47");                 //速度变化标签
            SwitchButtonUnClickable(enterCarSpawn_Button, false);
        }
        if (GlobalDataManager.GetInstance().playerData.playerZoo.isGuide)
        {
            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_5)
            {
                SwitchButtonUnClickable(parkingSpace_Button, true);
                SwitchButtonUnClickable(profitCoins_Button, false);
                SwitchButtonUnClickable(enterCarSpawn_Button, false);
            }
            else if (uIGuidePage.newBieGuild_step == NewBieGuild.Step_8)
            {
                SwitchButtonUnClickable(parkingSpace_Button, false);
                SwitchButtonUnClickable(profitCoins_Button, false);
                SwitchButtonUnClickable(enterCarSpawn_Button, true);
            }
        }
        //else
        //{
        //    SwitchButtonUnclickable(parkingSpace_Button, true);
        //    SwitchButtonUnclickable(profitCoins_Button, true);
        //    SwitchButtonUnclickable(enterCarSpawn_Button, true);
        //}

        if (profitLevel >= parkingProfitMaxGrade)
        {
            lvText.text       = string.Format(GetL10NString("Ui_Text_2"), GetL10NString("Ui_Text_126"));;
            gradeSlider.value = 1;
            gradeText_2.text  = GetL10NString("Ui_Text_126"); //最大等级上限
            gradeSlider_IconBg.gameObject.SetActive(false);
            scoreNumTest.text = GetL10NString("Ui_Text_126");
        }
        else
        {
            gradeSlider_IconBg.gameObject.SetActive(true);
        }
    }
        protected void OnSpawnVisitorFromGroundParking(Message msg)
        {
            var _msg = msg as SpawnVisitorFromGroundParking;
            //path_touristcar_intoupline
            //"path_tourist_intoupline";
            //var path = PathManager.GetInstance().GetPath("path_touristcar_intoupline");
            //var carBaseLinePos = path[_msg.groupID];
            //var lastCorner = carBaseLinePos - GlobalDataManager.GetInstance().SceneForward * (8 + _msg.idx * 5);
            //var visitorBaseLinePos = PathManager.GetInstance().GetPath("path_tourist_intoupline")[_msg.idx];
            //LogWarp.LogErrorFormat("{0}-{1}:{2},{3}", _msg.groupID, _msg.idx, lastCorner, visitorBaseLinePos);

            EntityVisitor entity = null;

            //VisitorState defaultState = VisitorState.EnterZoo;

            //switch (_msg.stage)
            //{
            //    case VisitorStage.GotoZoo:
            //        //defaultState = VisitorState.EnterZoo;
            //        defaultState = VisitorState.GotoZooEntry;
            //        break;
            //    case VisitorStage.GotoParking:
            //        defaultState = VisitorState.GotoParking;
            //        break;
            //    default:
            //        string e = string.Format("VisitorStage 异常{0}", _msg.stage);
            //        throw new System.Exception(e);
            //}

            if (isRandomSpawn)
            {
                //entity = EntityManager.GetInstance().GetRandomEntity(
                //    ResType.Visitor, EntityFuncType.Visitor_From_Car) as EntityVisitor;
                entity = EntityManager.GetInstance().GetRandomEntity(
                    ResType.Visitor, _msg.funcType) as EntityVisitor;
            }
            else
            {
                //entity = EntityManager.GetInstance().GenEntityGameObject(
                //    101, EntityFuncType.Visitor_From_Car) as EntityVisitor;
                entity = EntityManager.GetInstance().GenEntityGameObject(
                    101, _msg.funcType) as EntityVisitor;
            }
            entity.groundParkingGroupID = _msg.groupID;
            entity.groundParkingIdx     = _msg.idx;
            //LogWarp.LogErrorFormat("{0} visitor SpawnModule groupID={1}, idx={2}", entity.entityID,
            //    entity.groundParkingGroupID, entity.groundParkingIdx);

            DebugFile.GetInstance().MarkGameObject(entity.mainGameObject, "visitor_ground_{0}", entity.entityID);

            EntityManager.GetInstance().AddToEntityMovables(entity);

            if (entity.anim == null)
            {
                entity.anim = new SimpleAnimation();
            }
            //entity.anim.Init(entity.mainGameObject);
            entity.InitAnim();

            entity.moveSpeed = Config.globalConfig.getInstace().ZooVisitorSpeed;

            if (GlobalDataManager.GetInstance().playerData.playerZoo.isGuide == true)
            {
                UIGuidePage uIGuidePage = PageMgr.GetPage <UIGuidePage>();
                if (uIGuidePage != null && uIGuidePage.newBieGuild_step <= NewBieGuild.Step_4)
                {
                    entity.moveSpeed = Config.globalConfig.getInstace().GuideZooVisitorSpeed;
                }
            }


            if (entity.followPath == null)
            {
                entity.followPath = new FollowPath();
            }

            if (entity.fsmMachine == null)
            {
                entity.fsmMachine = new FSMMachineVisitor(entity);
                //entity.fsmMachine.AddState(new StateVisitorEnterZoo((int)VisitorState.EnterZoo,
                //    entity.fsmMachine));
                entity.fsmMachine.AddState(new StateVisitorGotoZooEntry((int)VisitorState.GotoZooEntry,
                                                                        entity.fsmMachine));
                entity.fsmMachine.AddState(new StateVisitorLeaveZooEntryQueueFull((int)VisitorState.LeaveZooEntryQueueFull,
                                                                                  entity.fsmMachine));
                entity.fsmMachine.AddState(new StateVisitorEntryQueue((int)VisitorState.EntryQueue,
                                                                      entity.fsmMachine));
                entity.fsmMachine.AddState(new StateVisitorStayFirstPosInEntryQueue((int)VisitorState.StayFirstPosInEntryQueue,
                                                                                    entity.fsmMachine));
                entity.fsmMachine.AddState(new StateVisitorChoseLittleZoo((int)VisitorState.ChoseLittleZoo,
                                                                          entity.fsmMachine));
                entity.fsmMachine.AddState(new StateVisitorEnterLittleZooApply((int)VisitorState.EnterLittleZooApply,
                                                                               entity.fsmMachine));
                //entity.fsmMachine.AddState(new StateVisitorStayWaitSeat((int)VisitorState.StayWaitSeat,
                //    entity.fsmMachine));
                entity.fsmMachine.AddState(new StateVisitorStayVisitSeat((int)VisitorState.StayVisitSeat,
                                                                         entity.fsmMachine));
                entity.fsmMachine.AddState(new StateVisitorLeaveNonLittleZoo((int)VisitorState.LeaveNonLittleZoo,
                                                                             entity.fsmMachine));
                //entity.fsmMachine.AddState(new StateVisitorCrossGroupPath((int)VisitorState.CrossGroupPath,
                //    entity.fsmMachine));
                entity.fsmMachine.AddState(new StateVisitorLeaveFromZooEntry((int)VisitorState.LeaveFromZooEntry,
                                                                             entity.fsmMachine));
                //entity.fsmMachine.AddState(new StateVisitorGotoStartOfExitGateEntryPath((int)VisitorState.GotoStartOfExitGateEntryPath,
                //    entity.fsmMachine));
                //entity.fsmMachine.AddState(new StateVisitorGotoExitGateEntryQueue((int)VisitorState.GotoExitGateEntryQueue,
                //    entity.fsmMachine));
                entity.fsmMachine.AddState(new StateVisitorGotoParking((int)VisitorState.GotoParking,
                                                                       entity.fsmMachine));
                entity.fsmMachine.AddState(new StateVisitorGotoGroundParking((int)VisitorState.GotoGroundParking,
                                                                             entity.fsmMachine));

                entity.fsmMachine.SetDefaultState((int)VisitorState.GotoZooEntry);
            }
            else
            {
                //LogWarp.LogError("pool游客");
                //entity.fsmMachine.GotoState((int)VisitorState.GotoZooEntry);

                entity.fsmMachine.GotoState((int)VisitorState.GotoZooEntry);
            }
            entity.Active();
            DebugFile.GetInstance().WriteKeyFile(entity.entityID, "{0} Play {1}", entity.entityID, Config.globalConfig.getInstace().VisitorWalk);
            entity.PlayActionAnim(Config.globalConfig.getInstace().VisitorWalk);
        }
    public void SetNumberOfVideoViews(AdTagFM adTagFM)
    {
        switch (adTagFM)
        {
        case AdTagFM.Add_Double_Advert:
            if (playerLockGainDoubleAdsVideoCount < Config.globalConfig.getInstace().GoldRewardMaxNumber)
            {
                playerLockGainDoubleAdsVideoCount += 1;
                if (playerLockGainDoubleAdsVideoCount == Config.globalConfig.getInstace().GoldRewardMaxNumber)
                {
                    var rewardNumCoin = PlayerDataModule.AllScenePerMinCoin(true) * Config.globalConfig.getInstace().AdvertGoldReward;
                    //加钱
                    SetValueOfPlayerData.Send((int)GameMessageDefine.AddCoinOfPlayerDataMSSC, 0, rewardNumCoin, 0);
                    float timeCount = 0.1f;
                    DOTween.To(() => timeCount, a => timeCount = a, 0.1f, 0.1f).OnComplete(new TweenCallback(delegate
                    {
                        UIMainPage uIMainPage = PageMgr.GetPage <UIMainPage>();
                        uIMainPage.OnMoneyEffect();    //飘钱特效
                    }));
                }
            }

            break;

        case AdTagFM.Add_Tourist_Advert:
            playerLockVisitorNumberAdsVideoCount += 1;
            break;

        case AdTagFM.Add_Ticket_Advert:
            playerLockEntryExpediteAdsVideoCount += 1;
            break;

        case AdTagFM.Add_Visit_Advert:
            playerLockVisitorExpediteAdsVideoCount += 1;
            break;

        case AdTagFM.Add_Offline_Advert:
            playerLockOfflineAdsVideoCount += 1;
            break;

        case AdTagFM.Add_Viptiming_Advert:
            playerFreeItemAdsVideoCount += 1;
            break;

        default:
            break;
        }

        playerWatchAdsVideoCount += 1;



        if (adTagFM == AdTagFM.Add_Double_Advert)
        {
        }
        if (playerWatchAdsVideoCount == Config.globalConfig.getInstace().AdvertRewardNumber)
        {
            var rewardNum = Config.globalConfig.getInstace().AdvertRewardRmbNumber;
            //加钻石
            SetValueOfPlayerData.Send((int)GameMessageDefine.SetDiamondOfPlayerData, rewardNum, 0, 0);
            LogWarp.LogErrorFormat("看广告6次    增加了钻石");
            playerWatchAdsVideoCount = 0;
        }
    }
Example #30
0
        protected void SpawnInGroundParkingCar(EntityFuncType entityFuncType, ParkingSpace parkingSpace)
        {
            EntityGroundParkingCar entity = null;

            //if (isRandomCar)
            {
                entity = EntityManager.GetInstance().GetRandomEntity(ResType.Car, entityFuncType) as EntityGroundParkingCar;
            }
            //else
            //{
            //    entity = EntityManager.GetInstance().GenEntityGameObject(2, EntityFuncType.VisitorCar_EnterZoo) as EntityGroundParkingCar;
            //}

            DebugFile.GetInstance().MarkGameObject(entity.mainGameObject, "car_{0}_{1}_{2}", entity.mainGameObject.GetInstanceID(), entityFuncType, entity.entityID);
            DebugFile.GetInstance().WriteKeyFile(entity.entityID, "{0} 生成 {1}", entity.entityID, entity.mainGameObject.GetInstanceID());
            DebugFile.GetInstance().WriteKeyFile(entity.mainGameObject.GetInstanceID(), "{0} 生成 {1}", entity.mainGameObject.GetInstanceID(), entity.entityID);

            EntityManager.GetInstance().AddToEntityMovables(entity);
            if (entity.anim == null)
            {
                entity.anim = new SimpleAnimation();
            }

            entity.anim.Init(entity.mainGameObject);
            if (entity.followPath == null)
            {
                entity.followPath = new FollowPathSuperMarketSimply();
            }

            //从表里取速度
            entity.moveSpeed = Config.globalConfig.getInstace().ZooCarSpeed;

            if (GlobalDataManager.GetInstance().playerData.playerZoo.isGuide == true)
            {
                UIGuidePage uIGuidePage = PageMgr.GetPage <UIGuidePage>();
                if (uIGuidePage == null && GlobalDataManager.GetInstance().playerData.GetLittleZooModuleData(1001).littleZooTicketsLevel < 5)
                {
                    entity.moveSpeed = Config.globalConfig.getInstace().GuideZooCarSpeed;
                }
                else if (uIGuidePage == null && GlobalDataManager.GetInstance().playerData.GetLittleZooModuleData(1001).littleZooTicketsLevel >= 5)
                {
                    GlobalDataManager.GetInstance().playerData.playerZoo.isGuide = false;
                }
            }


            entity.groundParkingGroupID = parkingSpace.groupID;
            entity.groundParkingIdx     = parkingSpace.idx;

            string pathName = "";

            switch (entityFuncType)
            {
            case EntityFuncType.GroundParkingCar:
                //pathName = globalConfig.getInstace().NaturalVisitorInto;
                pathName = string.Format("InGroundParking_{0}_{1}", parkingSpace.groupID, parkingSpace.idx);

                break;

            //case EntityFuncType.VisitorCar_LeaveZoo:
            //    pathName = globalConfig.getInstace().NaturalVisitorOut_2;
            //    break;
            default:
                string e = string.Format("car 没有这种功能类型{0}", entityFuncType);
                throw new System.Exception(e);
            }
            int sceneID = GlobalDataManager.GetInstance().playerData.playerZoo.currSceneID;

            Config.parkingCell parkingCell = GlobalDataManager.GetInstance().logicTableParkingData.GetParkingCell(sceneID);
            //var path = PathManager.GetInstance().GetPath(pathName);
            //var path = CalcPathManager.GenInGroundParkingSpacePath(ps.groupID, ps.idx, 8f, 5f, 7f, -1);
            var            pathUnit = GroundParingSpacePathManager.GetInstance().GetPathUnit(parkingSpace.groupID, parkingSpace.idx);
            List <Vector3> path     = null;

            if (!GroundParingSpacePathManager.IsExist(pathUnit.inPath))
            {
                //path = GroundParingSpacePathManager.GenInPath(parkingSpace.groupID, parkingSpace.idx, 8f, 5f, 7f, -1);
                path = GroundParingSpacePathManager.GenInPath(parkingSpace.groupID, parkingSpace.idx,
                                                              Config.globalConfig.getInstace().GroundParkingFristSpaceOffset,
                                                              Config.globalConfig.getInstace().GroundParkingSpace,
                                                              Config.globalConfig.getInstace().GroundParkingSpacePosOffset,
                                                              parkingCell.openseatdir[parkingSpace.groupID]);

                GroundParingSpacePathManager.GetInstance().AddPath(GroundParingSpacePathType.InPath, pathUnit, path, null);
            }
            path = pathUnit.inPath;

            entity.position = path[0];
            DebugFile.GetInstance().WriteKeyFile(entity.entityID, "{0} 移动位置到路径起点{1}, pos {2}", entity.entityID, entity.mainGameObject.GetInstanceID(), path[0]);
            DebugFile.GetInstance().WriteKeyFile(entity.mainGameObject.GetInstanceID(), "{0} 移动位置到路径起点{1}, pos {2}", entity.mainGameObject.GetInstanceID(), entity.entityID, path[0]);

            DebugFile.GetInstance().WriteKeyFile(entity.entityID, "{0} 沿着路径{1}出发", entity.entityID, pathName);
            //entity.followPath.Init(entity, path.ToArray(), path[0], 0, entity.moveSpeed, false);
            entity.followPath.Init(entity, parkingSpace.groupID, parkingSpace.idx, path, path[0], 0, entity.moveSpeed);
            entity.Active();
            //ps.parkingCar = entity;
            //TracedCamera(entity);
            parkingSpace.SetBeLocked(entity);

            /*若是新手引导阶段,附加跟随对象 不调用步骤*/
            if (GlobalDataManager.GetInstance().playerData.playerZoo.isGuide == true)
            {
                DelayedOperationNewbieGuideStage(entity);
            }
        }