namespace Fort23.Mono { public class HeroAttributeData { public string name; public string currentValue; public string nextValue; public HeroAttributeData(string name, string currentValue, string nextValue) { this.name = name; this.currentValue = currentValue; this.nextValue = nextValue; } } [UIBinding(prefab = "HeroAttributeWidget")] public partial class HeroAttributeWidget : UIComponent { private void Init() { } public override void AddEvent() { } public override void DelEvent() { } public override void AddButtonEvent() { } public void CustomInit(HeroAttributeData data) { Text_Name.text = data.name; Text_Value.text = data.currentValue; Text_NextValue.text = data.nextValue; } } }