ProjectDDD/Packages/SLUnity/SLUI/SLUIDragClickTarget.cs
2025-07-08 19:46:31 +09:00

41 lines
901 B
C#

using UnityEngine.UI;
namespace Superlazy.UI
{
public class SLUIDragClickTarget : SLUIComponent
{
public SLValueComparison comparison;
private Button button;
protected override void Validate()
{
button = GetComponent<Button>();
}
protected override void Init()
{
}
protected override void Enable()
{
//if (comparison.useCheckValue) comparison.OnEnable(bindParent.BindPath, OnChange);
}
protected override void Disable()
{
//if (comparison.useCheckValue) comparison.OnDisable();
}
public bool CanClick()
{
if (comparison.useCheckValue && comparison.Result == false) return false;
return true;
}
public void Click()
{
button.onClick.Invoke();
}
}
}