using System.Collections; using System.Collections.Generic; using UnityEngine; using AX.Common; using System; using DevelopEngine; using UnityEngine.UI; //Author:YHD public class NodeSecondLevelControl : SingletonMono { #region Variables public ObjectPool nodePool; public Func creator; public Action clearer; private int nodeCount = 0; private GameObject nodePrefab; private Transform ContentParent; private List nodeDataList; public NodeItem_SL curNodeItem_SL; private string lastNodeName; private TagsControl TagsControl; private GameObject AddNodeBtn; private GameObject SaveNodeBtn; #endregion #region Mono Methods // Use this for initialization void Awake() { nodePrefab = Resources.Load("UIPrefab/NodeItem_SL"); ContentParent = TransformHelper.FindChild(transform, "ToolGrid"); nodeDataList = new List(); nodeCount = ContentParent.childCount; TagsControl = TransformHelper.FindChild(transform, "TagsScrollView").GetComponent(); creator = () => { var node = Instantiate(nodePrefab); node.SetActive(true); return node; }; clearer = (obj) => { obj.SetActive(false);obj.GetComponent().isOn = false; }; nodePool = new ObjectPool(8, creator, clearer); AddNodeBtn = TransformHelper.FindChild(transform, "AddNodeBtn").gameObject; SaveNodeBtn = TransformHelper.FindChild(transform, "SaveNodeBtn").gameObject; } void Start() { ExamInfoHelpClass.NameListWorkPath = Application.dataPath + @"/ExtendFolder/xml/SaveCoursewares/345/" + "NodeNameList.xml"; GenerateNodeAccordingFirstLevelID(7); AddNodeBtn.GetComponent