26 lines
632 B
C#
26 lines
632 B
C#
|
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();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|