using UnityEngine.UI; namespace TFramework { public class BindIntData : BindDataBase { public static implicit operator int(BindIntData data) => data.Data; public static explicit operator float(BindIntData data) => data.Data; protected override void BindEvent(UIBehaviour uI) { uI.GetComponent()?.onValueChanged.AddListener((value) => Data = (int)value); uI.GetComponent()?.onValueChanged.AddListener(value => Data = (int)value); } protected override void DataValueChangeEvent() { foreach (var item in m_UIs) { if (item.GetComponent()) item.GetComponent().text = Data.ToString(); } } } }