少年修仙传客户端代码仓库
client_Zxw
2018-09-29 7bd169aec531959daad345c37edcd250c381b8d1
2077 【BUG】【主干】引导出现错误
1个文件已修改
51 ■■■■ 已修改文件
System/MainInterfacePanel/TaskListTip.cs 51 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/TaskListTip.cs
@@ -215,38 +215,22 @@
        }
        void TaskToAdd(int MissionID, int MissionState, int DiscriptionIndex)//添加任务
        {
            TaskScheduling();
            var inDungeon = IsDungeon();
            TaskScheduling();
            if (WindowCenter.Instance.IsOpen<MainInterfaceWin>() && !inDungeon)
            {
                if (MissionState != 0)
                if (MissionState != 0 && MissionID!=1 && _list.Contains(MissionID))
                {
                    TaskAddAndDelete(MissionID);
                }
            }
            TaskJump(MissionID);
                    return;
        }
        void LodingDelTask(int TaskID)
        {
            int LengChild = Content.childCount;
            for (int i = 0; i < LengChild; i++)
            {
                TaskType taskType = Content.GetChild(i).GetComponent<TaskType>();
                FlyingShoesTask flyingShoesTask = Content.GetChild(i).GetComponent<FlyingShoesTask>();
                if (taskType.TaskID == TaskID && taskType.gameObject.activeSelf)
                {
                    taskType.gameObject.SetActive(false);
                    if (TaskID != taskmodel.GetNowTaskID && flyingShoesTask.ImgSelected.activeSelf)
                    {
                        flyingShoesTask.ImgSelected.SetActive(false);
                    }
                    flyingShoesTask.UIEffect.Play();
                }
            }
            SetLength();
        }
        private void TaskAddAndDelete(int TaskID)
        {
            //for (int i = 0; i < Content.childCount; i++)
@@ -349,21 +333,38 @@
                    taskType.ClearTaskName();
                    obj.SetActive(false);
                    obj.transform.SetAsLastSibling();                   
                    return;
                }
            }
        }
        private void ChangeSort()//关于任务变更排序
        {
            for (int i = 0; i < Content.childCount; i++)
            for (int i = 0; i < _list.Count; i++)
            {
                GameObject obj = Content.GetChild(i).gameObject;
                for (int j = 0; j < Content.childCount; j++)
                {
                    GameObject obj = Content.GetChild(j).gameObject;
                TaskType taskType = obj.GetComponent<TaskType>();
                if (taskType.TaskID != 0 && _list.Contains(taskType.TaskID))
                    if (taskType.TaskID != 0 && taskType.TaskID == _list[i])
                {
                    int Inedx = _list.IndexOf(taskType.TaskID);
                    obj.transform.SetSiblingIndex(Inedx);
                }
            }
            }
            //for (int i = 0; i < Content.childCount; i++)
            //{
            //    GameObject obj = Content.GetChild(i).gameObject;
            //    TaskType taskType = obj.GetComponent<TaskType>();
            //    if (taskType.TaskID != 0 && _list.Contains(taskType.TaskID))
            //    {
            //        int Inedx = _list.IndexOf(taskType.TaskID);
            //        obj.transform.SetSiblingIndex(Inedx);
            //    }
            //}
        }