少年修仙传客户端代码仓库
client_linchunjie
2018-11-19 80affe2c279f2fd97762af997fb0e2e6224647ac
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
1个文件已修改
65 ■■■■■ 已修改文件
System/MainInterfacePanel/TaskListTip.cs 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/TaskListTip.cs
@@ -139,7 +139,7 @@
        private void Updatefighting(PlayerDataRefresh obj)//等级刷新
        {
        }
        private void CardLevelChangeEvent(int taskID)//卡级状态改变
        {
@@ -201,20 +201,20 @@
        }
        void TaskToAdd(int MissionID, int MissionState, int DiscriptionIndex)//添加任务
        {
            var inDungeon = IsDungeon();
            TaskScheduling();
            if (WindowCenter.Instance.IsOpen<MainInterfaceWin>() && !inDungeon)
            {
                if (MissionState != 0 && MissionID!=1 && _list.Contains(MissionID))
                {
                if (MissionState != 0 && MissionID != 1 && _list.Contains(MissionID))
                {
                    TaskAddAndDelete(MissionID);
                    TaskJump(MissionID);
                    return;
                }
            }
        }
        private void TaskAddAndDelete(int TaskID)
@@ -244,27 +244,6 @@
                }
            }
            //for (int i = 0; i < Content.childCount; i++)
            //{
            //    if (i < _list.Count)
            //    {
            //        GameObject obj = Content.GetChild(i).gameObject;
            //        TaskType childObjTaskType = Content.GetChild(i).gameObject.GetComponent<TaskType>();
            //        if (childObjTaskType.TaskID == TaskID)
            //        {
            //            return;
            //        }
            //        if (childObjTaskType.TaskID == 0)
            //        {
            //            obj.SetActive(true);
            //            childObjTaskType.TaskID = TaskID;
            //            childObjTaskType.IsGameObjectName(TaskID);
            //            childObjTaskType.IsMysteriousTask();
            //            obj.GetComponent<FlyingShoesTask>().FlyingShoes_Task(TaskID);
            //        }
            //    }
            //}
            ChangeSort();//关于任务变更排序
            SetLength();
        }
@@ -274,7 +253,7 @@
            TaskScheduling();
            for (int i = 0; i < _list.Count; i++)
            {
                if (i <= Content.childCount-1)
                if (i <= Content.childCount - 1)
                {
                    GameObject childObj = Content.GetChild(i).gameObject;
                    TaskType childObjTaskType = Content.GetChild(i).gameObject.GetComponent<TaskType>();
@@ -290,7 +269,7 @@
                        }
                    }
                }
            }
            SetLength();
            TaskJump();
@@ -304,7 +283,7 @@
            {
                DeleteSort(_IdTask);
            }
        }
        private void DeleteSort(int taskID)//关于任务删除
@@ -339,18 +318,7 @@
                        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);
            //    }
            //}
        }
@@ -455,7 +423,7 @@
            {
                return -xPack.LV.CompareTo(yPack.LV);
            }
            return 1;
        }
@@ -472,7 +440,7 @@
            return mapConfig != null && mapConfig.MapFBType != 0;
        }
        private void TaskJump(int jumpTask=0)
        private void TaskJump(int jumpTask = 0)
        {
            int type = 0;
            if (jumpTask == 0)//跳到默认选中
@@ -491,7 +459,7 @@
                    {
                        type = _list.IndexOf(taskmodel.GetNowTaskID);
                    }
                }
                }
            }
            else
            {
@@ -516,7 +484,14 @@
                    _position = (_list.Count - type) * m_SizeHeight + (_list.Count - type - 1) * 2;
                }
                _position -= 196;
                m_ScrollRect.verticalNormalizedPosition = Mathf.Clamp01(_position / ((Content as RectTransform).sizeDelta.y - 196));
                if (_list.Count == 3 && type == 2)
                {
                    m_ScrollRect.verticalNormalizedPosition = 0;
                }
                else
                {
                    m_ScrollRect.verticalNormalizedPosition = Mathf.Clamp01(_position / ((Content as RectTransform).sizeDelta.y - 196));
                }
            }
        }
    }