static int OnTouchEventHandle(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 1); LuaFunction arg0 = LuaScriptMgr.GetLuaFunction(L, 1); UtilCommon.OnTouchEventHandle o = LuaHelper.OnTouchEventHandle(arg0); LuaScriptMgr.Push(L, o); return(1); }
public static Delegate UtilCommon_OnTouchEventHandle(LuaFunction func) { UtilCommon.OnTouchEventHandle d = (param0, param1, param2) => { int top = func.BeginPCall(); IntPtr L = func.GetLuaState(); LuaScriptMgr.Push(L, param0); LuaScriptMgr.PushVarObject(L, param1); LuaScriptMgr.PushArray(L, param2); func.PCall(top, 3); func.EndPCall(top); }; return(d); }
static int SetEventHandle(IntPtr L) { int count = LuaDLL.lua_gettop(L); if (LuaScriptMgr.CheckTypes(L, 1, typeof(UIEventListener), typeof(int), typeof(UtilCommon.OnTouchEventHandle)) && LuaScriptMgr.CheckParamsType(L, typeof(object), 4, count - 3)) { UIEventListener obj = (UIEventListener)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UIEventListener"); int arg0 = (int)LuaDLL.lua_tonumber(L, 2); UtilCommon.OnTouchEventHandle arg1 = null; LuaTypes funcType3 = LuaDLL.lua_type(L, 3); if (funcType3 != LuaTypes.LUA_TFUNCTION) { arg1 = (UtilCommon.OnTouchEventHandle)LuaScriptMgr.GetLuaObject(L, 3); } else { LuaFunction func = LuaScriptMgr.GetLuaFunction(L, 3); arg1 = (param0, param1, param2) => { int top = func.BeginPCall(); LuaScriptMgr.Push(L, param0); LuaScriptMgr.PushVarObject(L, param1); LuaScriptMgr.PushArray(L, param2); func.PCall(top, 3); func.EndPCall(top); }; } object[] objs2 = LuaScriptMgr.GetParamsObject(L, 4, count - 3); obj.SetEventHandle(arg0, arg1, objs2); return(0); } else if (LuaScriptMgr.CheckTypes(L, 1, typeof(UIEventListener), typeof(EnumTouchEventType), typeof(UtilCommon.OnTouchEventHandle)) && LuaScriptMgr.CheckParamsType(L, typeof(object), 4, count - 3)) { UIEventListener obj = (UIEventListener)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UIEventListener"); EnumTouchEventType arg0 = (EnumTouchEventType)LuaScriptMgr.GetLuaObject(L, 2); UtilCommon.OnTouchEventHandle arg1 = null; LuaTypes funcType3 = LuaDLL.lua_type(L, 3); if (funcType3 != LuaTypes.LUA_TFUNCTION) { arg1 = (UtilCommon.OnTouchEventHandle)LuaScriptMgr.GetLuaObject(L, 3); } else { LuaFunction func = LuaScriptMgr.GetLuaFunction(L, 3); arg1 = (param0, param1, param2) => { int top = func.BeginPCall(); LuaScriptMgr.Push(L, param0); LuaScriptMgr.PushVarObject(L, param1); LuaScriptMgr.PushArray(L, param2); func.PCall(top, 3); func.EndPCall(top); }; } object[] objs2 = LuaScriptMgr.GetParamsObject(L, 4, count - 3); obj.SetEventHandle(arg0, arg1, objs2); return(0); } else { LuaDLL.luaL_error(L, "invalid arguments to method: UIEventListener.SetEventHandle"); } return(0); }
public void SetHandle(UtilCommon.OnTouchEventHandle _handle, params object[] _params) { DestoryHandle(); eventHandle += _handle; handleParams = _params; }
public TouchHandle(UtilCommon.OnTouchEventHandle _handle, params object[] _params) { SetHandle(_handle, _params); }
public void SetEventHandle(EnumTouchEventType _type, UtilCommon.OnTouchEventHandle _handle, params object[] _params) { switch (_type) { case EnumTouchEventType.OnClick: if (null == onClick) { onClick = new TouchHandle(); } onClick.SetHandle(_handle, _params); break; case EnumTouchEventType.OnDoubleClick: if (null == onDoubleClick) { onDoubleClick = new TouchHandle(); } onDoubleClick.SetHandle(_handle, _params); break; case EnumTouchEventType.OnDown: if (onDown == null) { onDown = new TouchHandle(); } onDown.SetHandle(_handle, _params); break; case EnumTouchEventType.OnUp: if (onUp == null) { onUp = new TouchHandle(); } onUp.SetHandle(_handle, _params); break; case EnumTouchEventType.OnEnter: if (onEnter == null) { onEnter = new TouchHandle(); } onEnter.SetHandle(_handle, _params); break; case EnumTouchEventType.OnExit: if (onExit == null) { onExit = new TouchHandle(); } onExit.SetHandle(_handle, _params); break; case EnumTouchEventType.OnDrag: if (onDrag == null) { onDrag = new TouchHandle(); } onDrag.SetHandle(_handle, _params); break; case EnumTouchEventType.OnDrop: if (onDrop == null) { onDrop = new TouchHandle(); } onDrop.SetHandle(_handle, _params); break; case EnumTouchEventType.OnDragEnd: if (onDragEnd == null) { onDragEnd = new TouchHandle(); } onDragEnd.SetHandle(_handle, _params); break; case EnumTouchEventType.OnSelect: if (onSelect == null) { onSelect = new TouchHandle(); } onSelect.SetHandle(_handle, _params); break; case EnumTouchEventType.OnUpdateSelect: if (onUpdateSelect == null) { onUpdateSelect = new TouchHandle(); } onUpdateSelect.SetHandle(_handle, _params); break; case EnumTouchEventType.OnDeSelect: if (onDeSelect == null) { onDeSelect = new TouchHandle(); } onDeSelect.SetHandle(_handle, _params); break; case EnumTouchEventType.OnScroll: if (onScroll == null) { onScroll = new TouchHandle(); } onScroll.SetHandle(_handle, _params); break; case EnumTouchEventType.OnMove: if (onMove == null) { onMove = new TouchHandle(); } onMove.SetHandle(_handle, _params); break; } }
public void SetEventHandle(int _num, UtilCommon.OnTouchEventHandle _handle, params object[] _parms) { EnumTouchEventType _type = (EnumTouchEventType)_num; SetEventHandle(_type, _handle, _parms); }