123456789101112131415161718192021222324252627282930313233343536373839 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class InviteDlgPanel : MonoBehaviour
- {
- public List<InviteDlgUserItem> listItem;
- public List<InviteUserConfig> listConfig;
- private int ItemCount;
- private void Start()
- {
- ItemCount = 0;
- }
- public void Init(List<InviteUserConfig> inviteUserConfigList)
- {
- DestoryAll();
- for (int i = 0; i < inviteUserConfigList.Count; i++)
- {
- if(ItemCount<listItem.Count)
- {
- listItem[ItemCount++].SetData(null, "组长", inviteUserConfigList[i]);
- }
- }
- }
- public void DestoryAll()
- {
- for (int i = 0; i < ItemCount; i++)
- {
- listItem[i++].ResetData();
- }
- ItemCount = 0;
- }
- }
|