2023-12-10 12:28:20 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace Script.UI
|
|
|
|
|
{
|
|
|
|
|
public class UIComponent : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
[SerializeField] private List<PanelBase> list = new List<PanelBase>();
|
|
|
|
|
|
|
|
|
|
private void Awake()
|
|
|
|
|
{
|
|
|
|
|
foreach (var panelBase in list)
|
|
|
|
|
{
|
|
|
|
|
panelBase.gameObject.SetActive(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
UIManager.Instance.InitPanel(list);
|
|
|
|
|
}
|
2023-12-30 14:20:55 +08:00
|
|
|
|
|
|
|
|
|
private void Update()
|
|
|
|
|
{
|
|
|
|
|
if (Input.GetKey(KeyCode.T))
|
|
|
|
|
{
|
|
|
|
|
if (Input.GetKeyDown(KeyCode.Y))
|
|
|
|
|
{
|
|
|
|
|
UIManager.Instance.OpenPanel(PanelType.Test);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-12-10 12:28:20 +08:00
|
|
|
|
}
|
|
|
|
|
}
|