private static int LoadAssembly(IntPtr L) { try { LuaReflection luaReflection = LuaReflection.Get(L); string name = ToLua.CheckString(L, 1); LuaDLL.lua_pushboolean(L, luaReflection.LoadAssembly(name)); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, null)); } return(1); }
private static int FindType(IntPtr L) { string name = ToLua.CheckString(L, 1); LuaReflection luaReflection = LuaReflection.Get(L); List <Assembly> list = luaReflection.list; Type type = null; for (int i = 0; i < list.Count; i++) { type = list[i].GetType(name); if (type != null) { break; } } ToLua.Push(L, type); return(1); }