c1_unity/Assets/XLua/Gen/TMPro_TMP_SpriteWrap.cs
2023-04-03 11:04:31 +08:00

241 lines
8.1 KiB
C#

#if USE_UNI_LUA
using LuaAPI = UniLua.Lua;
using RealStatePtr = UniLua.ILuaState;
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
#else
using LuaAPI = XLua.LuaDLL.Lua;
using RealStatePtr = System.IntPtr;
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
#endif
using XLua;
using System.Collections.Generic;
namespace XLua.CSObjectWrap
{
using Utils = XLua.Utils;
public class TMProTMP_SpriteWrap
{
public static void __Register(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
System.Type type = typeof(TMPro.TMP_Sprite);
Utils.BeginObjectRegister(type, L, translator, 0, 0, 5, 5);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "name", _g_get_name);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "hashCode", _g_get_hashCode);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "unicode", _g_get_unicode);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "pivot", _g_get_pivot);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "sprite", _g_get_sprite);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "name", _s_set_name);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "hashCode", _s_set_hashCode);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "unicode", _s_set_unicode);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "pivot", _s_set_pivot);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "sprite", _s_set_sprite);
Utils.EndObjectRegister(type, L, translator, null, null,
null, null, null);
Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
Utils.EndClassRegister(type, L, translator);
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int __CreateInstance(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
if(LuaAPI.lua_gettop(L) == 1)
{
var gen_ret = new TMPro.TMP_Sprite();
translator.Push(L, gen_ret);
return 1;
}
}
catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return LuaAPI.luaL_error(L, "invalid arguments to TMPro.TMP_Sprite constructor!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_name(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
TMPro.TMP_Sprite gen_to_be_invoked = (TMPro.TMP_Sprite)translator.FastGetCSObj(L, 1);
LuaAPI.lua_pushstring(L, gen_to_be_invoked.name);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_hashCode(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
TMPro.TMP_Sprite gen_to_be_invoked = (TMPro.TMP_Sprite)translator.FastGetCSObj(L, 1);
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.hashCode);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_unicode(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
TMPro.TMP_Sprite gen_to_be_invoked = (TMPro.TMP_Sprite)translator.FastGetCSObj(L, 1);
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.unicode);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_pivot(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
TMPro.TMP_Sprite gen_to_be_invoked = (TMPro.TMP_Sprite)translator.FastGetCSObj(L, 1);
translator.PushUnityEngineVector2(L, gen_to_be_invoked.pivot);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_sprite(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
TMPro.TMP_Sprite gen_to_be_invoked = (TMPro.TMP_Sprite)translator.FastGetCSObj(L, 1);
translator.Push(L, gen_to_be_invoked.sprite);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_name(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
TMPro.TMP_Sprite gen_to_be_invoked = (TMPro.TMP_Sprite)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.name = LuaAPI.lua_tostring(L, 2);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_hashCode(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
TMPro.TMP_Sprite gen_to_be_invoked = (TMPro.TMP_Sprite)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.hashCode = LuaAPI.xlua_tointeger(L, 2);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_unicode(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
TMPro.TMP_Sprite gen_to_be_invoked = (TMPro.TMP_Sprite)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.unicode = LuaAPI.xlua_tointeger(L, 2);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_pivot(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
TMPro.TMP_Sprite gen_to_be_invoked = (TMPro.TMP_Sprite)translator.FastGetCSObj(L, 1);
UnityEngine.Vector2 gen_value;translator.Get(L, 2, out gen_value);
gen_to_be_invoked.pivot = gen_value;
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_sprite(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
TMPro.TMP_Sprite gen_to_be_invoked = (TMPro.TMP_Sprite)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.sprite = (UnityEngine.Sprite)translator.GetObject(L, 2, typeof(UnityEngine.Sprite));
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
}
}