Exemple #1
0
        /// <summary>
        /// 添加正在进行中的任务
        /// </summary>
        /// <param name="areaID"></param>
        /// <param name="item"></param>
        public void AddExploreMission(int areaID, ExploreRandomItem item)
        {
            var areaData = GetExploreAreaData(areaID, _currentExploreAreaType);

            if (areaData != null)
            {
                if (!CheckMissionExists(areaID, item.exploreID))
                {
                    areaData.currentMissionList.Add(item);
                }
            }
        }
        public void SetUpElement(ExploreRandomItem item)
        {
            if (item != null)
            {
                _item = item;
                var btn = transform.SafeGetComponent <Button>();
                btn.onClick.RemoveAllListeners();
                btn.onClick.AddListener(OnBtnClick);

                transform.FindTransfrom("Content/Text").SafeGetComponent <Text>().text        = item.missionName;
                transform.FindTransfrom("Area/Text").SafeGetComponent <Text>().text           = item.missionAreaName;
                transform.FindTransfrom("Content/Level/Value").SafeGetComponent <Text>().text = item.areaHardLevel.ToString();
            }
        }
Exemple #3
0
        /// <summary>
        /// 随机生成探索区域
        /// </summary>
        /// <param name="areaID"></param>
        public static List <ExploreRandomItem> GetRandomArea(int areaID, int maxCount)
        {
            if (maxCount <= 0)
            {
                return(null);
            }

            List <ExploreRandomItem> tempList = new List <ExploreRandomItem>();
            var list = Utility.TryParseIntList(GetExploreAreaDataByKey(areaID).ExploreList, ',');

            for (int i = 0; i < list.Count; i++)
            {
                var exploreData = GetExploreDataByKey(list[i]);
                if (exploreData != null)
                {
                    ExploreRandomItem item = new ExploreRandomItem(areaID, exploreData.ExploreID);
                    tempList.Add(item);
                }
            }
            ///Delect Doing Misson And Finished Mission
            for (int i = 0; i < tempList.Count; i++)
            {
                if (ExploreEventManager.Instance.CheckMissionIsDoing(areaID, tempList[i].exploreID) == true || ExploreEventManager.Instance.CheckMissionIsFinish(areaID, tempList[i].exploreID) == true)
                {
                    tempList.Remove(tempList[i]);
                }
            }

            if (tempList.Count >= maxCount)
            {
                return(Utility.GetRandomList <ExploreRandomItem>(tempList, maxCount));
            }
            else
            {
                return(tempList);
            }
        }
Exemple #4
0
 public void ShowExplorePointPage(ExploreRandomItem item)
 {
     UIManager.Instance.Register <UI.ExplorePointPageContext>(UIPath.WindowPath.Explore_Point_Page);
     UIManager.Instance.HideWnd(UIPath.WindowPath.Explore_Main_Page);
     UIManager.Instance.PopUpWnd(UIPath.WindowPath.Explore_Point_Page, WindowType.Page, true, item);
 }