protected void ButtonOnClick(GameObject buttonObj, UnityAction call, UnityAction call2 = null) { LtButton button = buttonObj.GetComponent <LtButton>(); button.ButtonOnClick(call, call2); }
/// <summary> /// 当前页面的LtButton注册 /// </summary> /// <param UIName="buttonName">Button的名字</param> /// <param UIName="call">1P事件</param> /// <param UIName="call2">2P事件</param> protected void ButtonOnClick(string buttonName, UnityAction call, UnityAction call2 = null) { LtButton button = gameObject.GetChildComponet <LtButton>(buttonName); button.ButtonOnClick(call, call2); }