public void SetupView(string name, int index, ClickCallBack callBack = null) { this.itemName = name; this.itemIndex = index; this._clickCallBack = callBack; base.transform.Find("Text").GetComponent <Text>().text = this.itemName; }
public void SetClickCallback(ClickCallBack callback) { this._clickCallBack = callback; }
//移除监听事件 public void RemoveListener(ClickCallBack fun) { OnClickCallBack -= fun; }
public void init(ClickCallBack clickCallBack) { this.clickCallBack = clickCallBack; }
//增加监听事件 public void AddListener(ClickCallBack fun) { OnClickCallBack += fun; }