public static Delegate UICamera_ObjectDelegate(LuaFunction func) { if (func == null) { UICamera.ObjectDelegate fn = delegate { }; return(fn); } UICamera.ObjectDelegate d = (new UICamera_ObjectDelegate_Event(func)).Call; return(d); }
public static Delegate UICamera_ObjectDelegate(LuaFunction func) { UICamera.ObjectDelegate d = (param0, param1) => { int top = func.BeginPCall(); IntPtr L = func.GetLuaState(); LuaScriptMgr.Push(L, param0); LuaScriptMgr.Push(L, param1); func.PCall(top, 2); func.EndPCall(top); }; return(d); }
static internal int checkDelegate(IntPtr l, int p, out UICamera.ObjectDelegate ua) { int op = extractFunction(l, p); if (LuaDLL.lua_isnil(l, p)) { ua = null; return(op); } else if (LuaDLL.lua_isuserdata(l, p) == 1) { ua = (UICamera.ObjectDelegate)checkObj(l, p); return(op); } LuaDelegate ld; checkType(l, -1, out ld); if (ld.d != null) { ua = (UICamera.ObjectDelegate)ld.d; return(op); } LuaDLL.lua_pop(l, 1); l = LuaState.get(l).L; ua = (UnityEngine.GameObject a1, UnityEngine.GameObject a2) => { int error = pushTry(l); pushValue(l, a1); pushValue(l, a2); ld.pcall(2, error); LuaDLL.lua_settop(l, error - 1); }; ld.d = ua; return(op); }