private void _OnShowCenter() { if (_controller.isShowBlackBg == true) { img_bg.color = new Color(0, 0, 0, 1); } EventTriggerListener.Get(btn_feelshare.gameObject).onClick += _FeelingShareHandler; EventTriggerListener.Get(btn_feelself.gameObject).onClick += _FeelSelfHandler; EventTriggerListener.Get(btn_feelsend.gameObject).onClick += _FeelSendHandler; _btnList = new FeelingItem[10]; for (var i = 0; i < 10; i++) { if (i == 0) { _btnList[0] = new FeelingItem(); _btnList[0].Init(this.btn_item.gameObject, _OnClickQuestionCallBack); QuestionAction += _btnList[0].MovePanel; } else { var transform = this.btn_item.transform.parent; var tmpObj = GameObject.Instantiate <Button>(this.btn_item); tmpObj.transform.SetParent(transform); tmpObj.transform.position = Vector3.one; tmpObj.transform.localScale = Vector3.one; var tmpItem = new FeelingItem(); tmpItem.Init(tmpObj.gameObject, _OnClickQuestionCallBack); QuestionAction += tmpItem.MovePanel; _btnList[i] = tmpItem; } //_btnList[i].name = "item" + i; //EventTriggerListener.Get(_btnList[i].gameObject).onClick += _ClickItemHandler; //_btnList[i].onClick.AddListener(_ClickItemHandler); } this._scrollRect.SetActiveEx(false); _FeelingShareHandler(null); }