更改文件架构
This commit is contained in:
26
Packages/Common~/Scripts/UX/Utils/UXPanelEvent.cs
Normal file
26
Packages/Common~/Scripts/UX/Utils/UXPanelEvent.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using BITKit;
|
||||
using UnityEngine.Events;
|
||||
namespace BITKit.UX
|
||||
{
|
||||
public class UXPanelEvent : MonoBehaviour, IPanelComponent
|
||||
{
|
||||
public UnityEvent<bool> onSetActive = new();
|
||||
public UnityEvent onActive = new();
|
||||
public UnityEvent onInactive = new();
|
||||
public void SetActive(bool active)
|
||||
{
|
||||
onSetActive.Invoke(active);
|
||||
if (active)
|
||||
{
|
||||
onActive.Invoke();
|
||||
}
|
||||
else
|
||||
{
|
||||
onInactive.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
11
Packages/Common~/Scripts/UX/Utils/UXPanelEvent.cs.meta
Normal file
11
Packages/Common~/Scripts/UX/Utils/UXPanelEvent.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b1e7cce3f9c6ae149b5b6809d9101069
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
26
Packages/Common~/Scripts/UX/Utils/UXWindowEvent.cs
Normal file
26
Packages/Common~/Scripts/UX/Utils/UXWindowEvent.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using BITKit;
|
||||
using UnityEngine.Events;
|
||||
namespace BITKit.UX
|
||||
{
|
||||
public class UXWindowEvent : MonoBehaviour, IWindowComponent
|
||||
{
|
||||
public UnityEvent<bool> onSetActive = new();
|
||||
public UnityEvent onActive = new();
|
||||
public UnityEvent onInactive = new();
|
||||
public void SetActive(bool active)
|
||||
{
|
||||
onSetActive.Invoke(active);
|
||||
if (active)
|
||||
{
|
||||
onActive.Invoke();
|
||||
}
|
||||
else
|
||||
{
|
||||
onInactive.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
11
Packages/Common~/Scripts/UX/Utils/UXWindowEvent.cs.meta
Normal file
11
Packages/Common~/Scripts/UX/Utils/UXWindowEvent.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bf4137d026ff6364397c4ea40fc5827c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user