using System.Collections; using System.Collections.Generic; using UnityEngine; public class DianLiManager : UpdateManager { public DianLiItem[] dllist; public override void updateData() { base.updateData(); dllist =this.GetComponentsInChildren(); DataManager.Instance.GetDL((data)=> { for (int i = 0; i < dllist.Length; i++) { if(data.serverList.Count>i) { dllist[i].updateData(data.serverList[i],i); dllist[i].gameObject.SetActive(true); } else { dllist[i].gameObject.SetActive(false); } } }); } }