1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- using ShadowStudio.Model;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class ArtTaskInfo
- {
- /// <summary>
- /// 资源类型,后续扩展
- /// </summary>
- public enum TaskType
- {
- /// <summary>
- /// 机械1
- /// </summary>
- JIXIE_1 = 1,
- /// <summary>
- /// 机械1
- /// </summary>
- JIXIE_2 = 2,
- /// <summary>
- /// 机械1
- /// </summary>
- JIXIE_3 = 3,
- /// <summary>
- /// 机械
- /// </summary>
- JIXIE_4 = 4,
- }
- private static List<ArtTaskAction> artTaskList=new List<ArtTaskAction>();
- private static List<ArtTaskChild> artChildList = new List<ArtTaskChild>();
- 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<ArtTaskAction> getTaskList(TaskType tt)
- {
- List<ArtTaskAction> ata = new List<ArtTaskAction>();
- 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<ArtTaskChild> getChildList(TaskType tt)
- {
- List<ArtTaskChild> atc = new List<ArtTaskChild>();
- for (int i = 0; i < artChildList.Count; i++)
- {
- if (tt == artChildList[i].ttype)
- {
- atc.Add(artChildList[i]);
- }
- }
- return atc;
- }
- public static List<ArtTaskAction> getTaskList()
- {
- return artTaskList;
- }
- }
|