You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.1 KiB
47 lines
1.1 KiB
4 years ago
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
|
||
|
public class EventPanel : MonoBehaviour
|
||
|
{
|
||
|
public GameObject ErrorInfoItem;
|
||
|
public Transform Content;
|
||
|
public ButtonRecordByAC CloseButton;
|
||
|
private void Start()
|
||
|
{
|
||
|
CloseButton.OutInterFaceButton = Close;
|
||
|
}
|
||
|
// Start is called before the first frame update
|
||
|
private void OnEnable()
|
||
|
{
|
||
|
LoadItem();
|
||
|
}
|
||
|
private void Close()
|
||
|
{
|
||
|
gameObject.SetActive(false);
|
||
|
}
|
||
|
private void LoadItem()
|
||
|
{
|
||
|
CleartItem();
|
||
|
List<ReportErroeSyncData> errorList = REPORT_ERROR_SYNC.ErrorList;
|
||
|
for (int i = 0; i < errorList.Count; i++)
|
||
|
{
|
||
|
GameObject item = Instantiate(ErrorInfoItem,Content);
|
||
|
item.GetComponent<ErrorInfoItem>().SetValue(errorList[i]);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private void CleartItem()
|
||
|
{
|
||
|
for (int i = 0; i < Content.childCount; i++)
|
||
|
{
|
||
|
Destroy(Content.GetChild(i).gameObject);
|
||
|
}
|
||
|
}
|
||
|
// Update is called once per frame
|
||
|
void Update()
|
||
|
{
|
||
|
|
||
|
}
|
||
|
}
|