32 lines
727 B
C#
32 lines
727 B
C#
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);
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
if (Input.GetKey(KeyCode.T))
|
|
{
|
|
if (Input.GetKeyDown(KeyCode.Y))
|
|
{
|
|
UIManager.Instance.OpenPanel(PanelType.Test);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |