| | |
| | | {
|
| | |
|
| | | }
|
| | | private void TaskIdUpdate(int taskId)
|
| | | {
|
| | | int leng = Content.childCount;
|
| | | for (int i = 0; i < leng; i++)
|
| | | {
|
| | | GameObject childObj = Content.GetChild(i).gameObject;
|
| | | TaskType childObjTaskType = Content.GetChild(i).gameObject.GetComponent<TaskType>();
|
| | | if (childObj.activeSelf && childObjTaskType.TaskID == taskId)
|
| | | {
|
| | | childObj.GetComponent<FlyingShoesTask>().FlyingShoes_Task(taskId);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void CardLevelChangeEvent(int taskID)//卡级状态改变
|
| | | {
|
| | | if (taskmodel.allMissionDict.ContainsKey(taskID) && taskmodel.allMissionDict[taskID].Type == 3)
|
| | |
| | |
|
| | | private void TaskAddAndDelete(int TaskID)
|
| | | {
|
| | | //for (int i = 0; i < Content.childCount; i++)
|
| | | //{
|
| | | // GameObject childObj = Content.GetChild(i).gameObject;
|
| | | // TaskType childObjTaskType = Content.GetChild(i).gameObject.GetComponent<TaskType>();
|
| | | // if (i < _list.Count)
|
| | | // {
|
| | | // if (!childObj.activeSelf)
|
| | | // {
|
| | | // childObj.SetActive(true);
|
| | | // }
|
| | | // childObjTaskType.TaskID = _list[i];
|
| | | // childObjTaskType.IsGameObjectName(_list[i]);
|
| | | // childObjTaskType.IsMysteriousTask();
|
| | | // childObj.GetComponent<FlyingShoesTask>().FlyingShoes_Task(_list[i]);
|
| | | // }
|
| | | // else
|
| | | // {
|
| | | // childObjTaskType.ClearTaskName();
|
| | | // if (childObj.activeSelf)
|
| | | // {
|
| | | // childObj.SetActive(false);
|
| | | // }
|
| | | // }
|
| | |
|
| | | //}
|
| | | for (int i = 0; i < Content.childCount; i++)
|
| | | {
|
| | | GameObject childObj = Content.GetChild(i).gameObject;
|
| | | TaskType childObjTaskType = Content.GetChild(i).gameObject.GetComponent<TaskType>();
|
| | | if (i < _list.Count)
|
| | | {
|
| | | GameObject obj = Content.GetChild(i).gameObject;
|
| | | TaskType childObjTaskType = Content.GetChild(i).gameObject.GetComponent<TaskType>();
|
| | | if (childObjTaskType.TaskID == TaskID)
|
| | | if (!childObj.activeSelf)
|
| | | {
|
| | | return;
|
| | | childObj.SetActive(true);
|
| | | }
|
| | | if (childObjTaskType.TaskID == 0)
|
| | | childObjTaskType.TaskID = _list[i];
|
| | | childObjTaskType.IsGameObjectName(_list[i]);
|
| | | childObjTaskType.IsMysteriousTask();
|
| | | childObj.GetComponent<FlyingShoesTask>().FlyingShoes_Task(_list[i]);
|
| | | }
|
| | | else
|
| | | {
|
| | | childObjTaskType.ClearTaskName();
|
| | | if (childObj.activeSelf)
|
| | | {
|
| | | obj.SetActive(true);
|
| | | childObjTaskType.TaskID = TaskID;
|
| | | childObjTaskType.IsGameObjectName(TaskID);
|
| | | childObjTaskType.IsMysteriousTask();
|
| | | obj.GetComponent<FlyingShoesTask>().FlyingShoes_Task(TaskID);
|
| | | childObj.SetActive(false);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | //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();
|
| | | }
|