This commit is contained in:
CortexCore
2023-11-06 01:17:23 +08:00
parent bd40165ade
commit 5446067f91
114 changed files with 2023 additions and 414 deletions

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace BITKit.UX
{
public sealed class UGUIPanelComponent : MonoBehaviour
{
[SerializeReference, SubclassSelector] private IUXPanel panel;
[SerializeField] private RectTransform rectTransform;
private void Start()
{
panel.OnEntry += OnEntry;
panel.OnExit += OnExit;
OnExit();
}
private void OnExit()
{
rectTransform.gameObject.SetActive(false);
}
private void OnEntry()
{
rectTransform.gameObject.SetActive(true);
}
}
}