using System.Collections; using System.Collections.Generic; using UnityEngine; using static Manager; public class GaoJingJiLu : UpdateManager { public JiLuItem item; public List items; public void setJILUData(GaoJingListData gj) { for (int i = 0; i < items.Count; i++) { Destroy(items[i].gameObject); } items = new List(); for (int i = 0; i < gj.list.Count; i++) { JiLuItem go = GameObject.Instantiate(item,item.transform.parent); go.gameObject.SetActive(true); go.setData(gj.list[i]); items.Add(go); } } public override void updateData() { base.updateData(); DataManager.Instance.GetGaoJingJiLuData((data) => { setJILUData( data); }); } }