예제 #1
0
        bool OnClickPoint(ExplorePointData point)
        {
            if (point == null)
            {
                return(false);
            }
            pointDetailDescText.text       = point.pointDesc;
            pointDetailTitleText.text      = point.pointName;
            pointDetailTimeCostText.text   = point.TimeCost.ToString() + " " + MultiLanguage.Instance.GetTextValue(Config.GeneralTextData.Game_Time_Text_Day);
            pointDetailEnergyCostText.text = point.EnergyCost.ToString();

            pointDetailWarningLevelTrans.SafeSetActiveAllChild(false);
            for (int i = 0; i < point.HardLevel; i++)
            {
                pointDetailWarningLevelTrans.GetChild(i).gameObject.SetActive(true);
            }

            ///Set Btn States
            if (point.currentState == ExplorePointData.PointState.Unlock)
            {
                ///Check Energy
                if (point.EnergyCost > _item.teamData.EnergyCurrentNum)
                {
                    pointDetailConfirmBtn.interactable = false;
                    pointDetailConfirmBtnText.text     = MultiLanguage.Instance.GetTextValue(Explore_Point_DetailBtn_EnergyLack);
                    return(true);
                }
                else
                {
                    pointDetailConfirmBtn.interactable = true;
                    pointDetailConfirmBtnText.text     = MultiLanguage.Instance.GetTextValue(Explore_Point_DetailBtn_Ready);
                    pointDetailConfirmBtn.onClick.AddListener(
                        () => {
                        StartExplore(point);
                    });
                }
            }
            else if (point.currentState == ExplorePointData.PointState.Lock || point.currentState == ExplorePointData.PointState.None)
            {
                pointDetailConfirmBtn.interactable = false;
                pointDetailConfirmBtnText.text     = MultiLanguage.Instance.GetTextValue(Explore_Point_DetailBtn_Lock);
            }
            else if (point.currentState == ExplorePointData.PointState.Finish)
            {
                pointDetailConfirmBtn.interactable = false;
                pointDetailConfirmBtnText.text     = MultiLanguage.Instance.GetTextValue(Explore_Point_DetailBtn_Finish);
            }
            else if (point.currentState == ExplorePointData.PointState.Doing)
            {
                pointDetailConfirmBtn.interactable = false;
                pointDetailConfirmBtnText.text     = MultiLanguage.Instance.GetTextValue(Explore_Point_DetailBtn_Doing);
            }

            if (pointDetailPanelAnim != null)
            {
                pointDetailPanelAnim.Play();
            }

            return(true);
        }
예제 #2
0
        void StartExplore(ExplorePointData point)
        {
            if (point == null)
            {
                return;
            }

            ExploreEventManager.Instance.StartExplorePoint(point.AreaID, point.ExploreID, point.PointID);
            foreach (var cmpt in _pointTransList)
            {
                if (cmpt.pointData.PointID == point.PointID)
                {
                    cmpt.RefreshPointTimer(point);
                }
            }
            ///Show Tip
            UIGuide.Instance.ShowGeneralHint(new GeneralHintDialogItem(
                                                 Utility.ParseStringParams(MultiLanguage.Instance.GetTextValue(Explore_Point_StartExplore_Hint), new string[1] {
                point.pointName
            }),
                                                 1.5f));
            ///Change Btn States
            pointDetailConfirmBtn.interactable = false;
            pointDetailConfirmBtnText.text     = MultiLanguage.Instance.GetTextValue(Explore_Point_DetailBtn_Doing);
        }
예제 #3
0
 /// <summary>
 /// 刷新点位倒计时
 /// </summary>
 /// <param name="point"></param>
 /// <returns></returns>
 bool RefreshPointTimer(ExplorePointData point)
 {
     if (point == null)
     {
         return(false);
     }
     foreach (var cmpt in _pointTransList)
     {
         if (cmpt.pointData.PointID == point.PointID)
         {
             cmpt.RefreshPointTimer(point);
         }
     }
     return(true);
 }
예제 #4
0
 public override bool OnMessage(UIMessage msg)
 {
     if (msg.type == UIMsgType.ExplorePage_Show_PointDetail)
     {
         ExplorePointData pointData = (ExplorePointData)msg.content[0];
         return(OnClickPoint(pointData));
     }
     else if (msg.type == UIMsgType.ExplorePage_Finish_Point)
     {
     }
     else if (msg.type == UIMsgType.ExplorePage_Update_PointTimer)
     {
         ExplorePointData pointData = (ExplorePointData)msg.content[0];
         return(RefreshPointTimer(pointData));
     }
     return(true);
 }
예제 #5
0
 bool ExplorePointFinish(ExplorePointData point)
 {
     return(true);
 }