Exemple #1
0
 void Awake()
 {
     TreeViewToggle.OnValueChangedAsObservable().Subscribe(ItemToggleValueChanged).AddTo(gameObject);
     //上下文按钮点击回调
     transform.Find("ContextButton").GetComponent <Button>().onClick.AddListener(ContextButtonClick);
     transform.Find("TreeViewButton").GetComponent <Button>().onClick.AddListener(delegate()
     {
         Controler.ClickItem(gameObject);
         //SelectChildren(this);
         MessageSystem.Broadcast(Msg.SelectAssetIcon, GetAllChildrensId(this));
     });
 }
Exemple #2
0
 private void ItemToggleValueChanged(bool b)
 {
     MessageSystem.Broadcast(Msg.ItemToggleValueChanged, Data.Id, b);
     ChangeChildrenToggle(this, b);
 }