1234567891011121314151617181920212223242526272829303132 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using static Manager;
- public class GaoJingJiLu : UpdateManager
- {
- public JiLuItem item;
- public List<JiLuItem> items;
- public void setJILUData(GaoJingListData gj)
- {
- for (int i = 0; i < items.Count; i++)
- {
- Destroy(items[i].gameObject);
- }
- items = new List<JiLuItem>();
- 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);
- });
- }
- }
|