public void setCallback(Action <int> callBack) { this.callBack = callBack; View.GoodsListView list = gameObject.GetComponent <View.GoodsListView>(); if (list != null) { list.setCallback(callBack); } }
private void initGoodsList() { View.GoodsListView list = transform.FindChild("Content").FindChild("GoodsList").GetComponent <View.GoodsListView>(); if (list != null) { list.setCallback(callBack); } list.ExceptId = _id; }