public void Invoke() { if (m_BindBehaviour != null && !string.IsNullOrEmpty(m_FuncName)) { SystemObject[] values = new SystemObject[m_OperateParams.Length]; for (int i = 0; i < m_OperateParams.Length; ++i) { values[i] = m_OperateParams[i].GetValue(); } m_BindBehaviour.CallActionWith(m_FuncName, values); } }
private void OnClicked() { if (binderBehaviour == null) { LogUtil.Error("UI", "LuaButton:OnClicked->the behaviour is null"); return; } if (string.IsNullOrEmpty(clickedFuncName)) { LogUtil.Error("UI", "LuaButton:OnClicked->the funcName is empty"); return; } if (paramValues == null || paramValues.Length == 0) { binderBehaviour.CallAction(clickedFuncName); } else { binderBehaviour.CallActionWith(clickedFuncName, paramValues); } }