1
This commit is contained in:
28
Src/Unity/Scripts/UX/Service/UGUI/UGUIPanelComponent.cs
Normal file
28
Src/Unity/Scripts/UX/Service/UGUI/UGUIPanelComponent.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
11
Src/Unity/Scripts/UX/Service/UGUI/UGUIPanelComponent.cs.meta
Normal file
11
Src/Unity/Scripts/UX/Service/UGUI/UGUIPanelComponent.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 431a2dfa95b360d4e850253dcbba2e4c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user