标签:
private void addEventListener(GameObject button) { EventDelegate eventDelegate = new EventDelegate(this, "OnChildClick"); eventDelegate.parameters[0] = new EventDelegate.Parameter(); eventDelegate.parameters[0].obj = button; EventDelegate.Add(button.GetComponent<UIButton>().onClick, eventDelegate); }
NGUI 为带UIButton组件的GO添加带参数的事件侦听
标签:
原文地址:http://www.cnblogs.com/songyias3/p/4650814.html