c1_unity/Assets/XLua/Gen/BF_EmojiGraphicWrap.cs
2025-11-03 15:00:43 +08:00

190 lines
6.0 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 BFEmojiGraphicWrap
{
public static void __Register(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
System.Type type = typeof(BF.EmojiGraphic);
Utils.BeginObjectRegister(type, L, translator, 0, 2, 2, 1);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetMeshInfos", _m_SetMeshInfos);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetMeshInfoFromLua", _m_SetMeshInfoFromLua);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "MainTexture", _g_get_MainTexture);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "mainTexture", _g_get_mainTexture);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "MainTexture", _s_set_MainTexture);
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 BF.EmojiGraphic();
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 BF.EmojiGraphic constructor!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_SetMeshInfos(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.EmojiGraphic gen_to_be_invoked = (BF.EmojiGraphic)translator.FastGetCSObj(L, 1);
{
System.Collections.Generic.List<BF.EmojiInfo> _emojiInfos = (System.Collections.Generic.List<BF.EmojiInfo>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List<BF.EmojiInfo>));
gen_to_be_invoked.SetMeshInfos( _emojiInfos );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_SetMeshInfoFromLua(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.EmojiGraphic gen_to_be_invoked = (BF.EmojiGraphic)translator.FastGetCSObj(L, 1);
{
System.Collections.Generic.List<UnityEngine.Vector3> _pos = (System.Collections.Generic.List<UnityEngine.Vector3>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List<UnityEngine.Vector3>));
System.Collections.Generic.List<float> _uv = (System.Collections.Generic.List<float>)translator.GetObject(L, 3, typeof(System.Collections.Generic.List<float>));
gen_to_be_invoked.SetMeshInfoFromLua( _pos, _uv );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_MainTexture(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.EmojiGraphic gen_to_be_invoked = (BF.EmojiGraphic)translator.FastGetCSObj(L, 1);
translator.Push(L, gen_to_be_invoked.MainTexture);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_mainTexture(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.EmojiGraphic gen_to_be_invoked = (BF.EmojiGraphic)translator.FastGetCSObj(L, 1);
translator.Push(L, gen_to_be_invoked.mainTexture);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_MainTexture(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.EmojiGraphic gen_to_be_invoked = (BF.EmojiGraphic)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.MainTexture = (UnityEngine.Texture2D)translator.GetObject(L, 2, typeof(UnityEngine.Texture2D));
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
}
}