Esempio n. 1
0
 protected override void Awake()
 {
     TableToValue.RegistEvent((UIVariable variable) =>
     {
         this.variable = variable;
         IsActive      = (Boolean)variable.value;
         gameObject.SetActive(IsReverse ? !IsReverse : IsActive);
     }, this.variable.name);
 }
Esempio n. 2
0
    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);
    }
Esempio n. 3
0
 protected override void OnDestroy()
 {
     TableToValue.UnRegistEvent(this.variable.name);
 }
Esempio n. 4
0
 public void SetVlaue(object value)
 {
     this.value = value;
     //刷新绑定了当前name的
     TableToValue.FireEvent(this.name, this);
 }