gdl_123 2 месяцев назад
Родитель
Сommit
811938e265

+ 38 - 0
Assets/ToLua/Source/Generate/LocalizedTextureCfgMgrWrap.cs

@@ -10,6 +10,7 @@ public class LocalizedTextureCfgMgrWrap
 		L.RegFunction("Init", Init);
 		L.RegFunction("SetLanguage", SetLanguage);
 		L.RegFunction("GetLocalizedSpriteCfg", GetLocalizedSpriteCfg);
+		L.RegFunction("GetCfgByLgkey", GetCfgByLgkey);
 		L.RegFunction("GetLocalize", GetLocalize);
 		L.RegFunction("SetLanguageByKey", SetLanguageByKey);
 		L.RegFunction("GetLanguageCfgByKey", GetLanguageCfgByKey);
@@ -117,6 +118,43 @@ public class LocalizedTextureCfgMgrWrap
 		}
 	}
 
+	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
+	static int GetCfgByLgkey(IntPtr L)
+	{
+		try
+		{
+			int count = LuaDLL.lua_gettop(L);
+
+			if (count == 3)
+			{
+				LocalizedTextureCfgMgr obj = (LocalizedTextureCfgMgr)ToLua.CheckObject<LocalizedTextureCfgMgr>(L, 1);
+				string arg0 = ToLua.CheckString(L, 2);
+				string arg1 = ToLua.CheckString(L, 3);
+				LocalizedSpriteCfg o = obj.GetCfgByLgkey(arg0, arg1);
+				ToLua.PushObject(L, o);
+				return 1;
+			}
+			else if (count == 4)
+			{
+				LocalizedTextureCfgMgr obj = (LocalizedTextureCfgMgr)ToLua.CheckObject<LocalizedTextureCfgMgr>(L, 1);
+				string arg0 = ToLua.CheckString(L, 2);
+				string arg1 = ToLua.CheckString(L, 3);
+				bool arg2 = LuaDLL.luaL_checkboolean(L, 4);
+				LocalizedSpriteCfg o = obj.GetCfgByLgkey(arg0, arg1, arg2);
+				ToLua.PushObject(L, o);
+				return 1;
+			}
+			else
+			{
+				return LuaDLL.luaL_throw(L, "invalid arguments to method: LocalizedTextureCfgMgr.GetCfgByLgkey");
+			}
+		}
+		catch (Exception e)
+		{
+			return LuaDLL.toluaL_exception(L, e);
+		}
+	}
+
 	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
 	static int GetLocalize(IntPtr L)
 	{

+ 39 - 0
Assets/ToLua/Source/Generate/UILocalizeTextureWrap.cs

@@ -12,6 +12,7 @@ public class UILocalizeTextureWrap
 		L.RegFunction("Dispose", Dispose);
 		L.RegFunction("__eq", op_Equality);
 		L.RegFunction("__tostring", ToLua.op_ToString);
+		L.RegVar("lgKey", get_lgKey, set_lgKey);
 		L.RegVar("key", get_key, set_key);
 		L.EndClass();
 	}
@@ -83,6 +84,25 @@ public class UILocalizeTextureWrap
 		}
 	}
 
+	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
+	static int get_lgKey(IntPtr L)
+	{
+		object o = null;
+
+		try
+		{
+			o = ToLua.ToObject(L, 1);
+			UILocalizeTexture obj = (UILocalizeTexture)o;
+			string ret = obj.lgKey;
+			LuaDLL.lua_pushstring(L, ret);
+			return 1;
+		}
+		catch(Exception e)
+		{
+			return LuaDLL.toluaL_exception(L, e, o, "attempt to index lgKey on a nil value");
+		}
+	}
+
 	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
 	static int get_key(IntPtr L)
 	{
@@ -102,6 +122,25 @@ public class UILocalizeTextureWrap
 		}
 	}
 
+	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
+	static int set_lgKey(IntPtr L)
+	{
+		object o = null;
+
+		try
+		{
+			o = ToLua.ToObject(L, 1);
+			UILocalizeTexture obj = (UILocalizeTexture)o;
+			string arg0 = ToLua.CheckString(L, 2);
+			obj.lgKey = arg0;
+			return 0;
+		}
+		catch(Exception e)
+		{
+			return LuaDLL.toluaL_exception(L, e, o, "attempt to index lgKey on a nil value");
+		}
+	}
+
 	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
 	static int set_key(IntPtr L)
 	{