static int DoAllHandle(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); UI.StateHandle obj = (UI.StateHandle)ToLua.CheckObject(L, 1, typeof(UI.StateHandle)); bool arg0 = LuaDLL.luaL_checkboolean(L, 2); System.Action <UI.Handle> arg1 = null; LuaTypes funcType3 = LuaDLL.lua_type(L, 3); if (funcType3 != LuaTypes.LUA_TFUNCTION) { arg1 = (System.Action <UI.Handle>)ToLua.CheckObject(L, 3, typeof(System.Action <UI.Handle>)); } else { LuaFunction func = ToLua.ToLuaFunction(L, 3); arg1 = DelegateFactory.CreateDelegate(typeof(System.Action <UI.Handle>), func) as System.Action <UI.Handle>; } obj.DoAllHandle(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }