protected override void Awake() { TableToValue.RegistEvent((UIVariable variable) => { this.variable = variable; IsActive = (Boolean)variable.value; gameObject.SetActive(IsReverse ? !IsReverse : IsActive); }, this.variable.name); }
protected override void Awake() { TableToValue.RegistEvent((UIVariable variable) => { this.UIText = GetComponent <Text>(); this.variable = variable; if (this.text == "") { UIText.text = (string)this.variable.value; } else { UIText.text = string.Format(this.text, this.variable.value); } }, this.variable.name); }
protected override void OnDestroy() { TableToValue.UnRegistEvent(this.variable.name); }
public void SetVlaue(object value) { this.value = value; //刷新绑定了当前name的 TableToValue.FireEvent(this.name, this); }