using ShadowStudio.Model; using System.Collections; using System.Collections.Generic; using UnityEngine; public class ArtTaskInfo { /// /// 资源类型,后续扩展 /// public enum TaskType { /// /// 机械1 /// JIXIE_1 = 1, /// /// 机械1 /// JIXIE_2 = 2, /// /// 机械1 /// JIXIE_3 = 3, /// /// 机械 /// JIXIE_4 = 4, } private static List artTaskList=new List(); private static List artChildList = new List(); public static void removeTask(ArtTaskAction at) { if (artTaskList.Contains(at)) artTaskList.Remove(at); } public static void addTask(ArtTaskAction at) { artTaskList.Add(at); } public static List getTaskList(TaskType tt) { List ata = new List(); for (int i = 0; i < artTaskList.Count; i++) { if (tt== artTaskList[i].ttype) { ata.Add(artTaskList[i]); } } return ata; } public static void removeChild(ArtTaskChild ac) { if(artChildList.Contains(ac)) artChildList.Remove(ac); } public static void addChild(ArtTaskChild ac) { artChildList.Add(ac); } public static List getChildList(TaskType tt) { List atc = new List(); for (int i = 0; i < artChildList.Count; i++) { if (tt == artChildList[i].ttype) { atc.Add(artChildList[i]); } } return atc; } public static List getTaskList() { return artTaskList; } }