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

215 lines
7.3 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 BFCharacterAnimationInfoWrap
{
public static void __Register(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
System.Type type = typeof(BF.CharacterAnimationInfo);
Utils.BeginObjectRegister(type, L, translator, 0, 0, 4, 4);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "hashName", _g_get_hashName);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "animationName", _g_get_animationName);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "animationTime", _g_get_animationTime);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "keyFrame", _g_get_keyFrame);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "hashName", _s_set_hashName);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "animationName", _s_set_animationName);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "animationTime", _s_set_animationTime);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "keyFrame", _s_set_keyFrame);
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)
{
translator.Push(L, default(BF.CharacterAnimationInfo));
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.CharacterAnimationInfo constructor!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_hashName(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.CharacterAnimationInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
LuaAPI.xlua_pushuint(L, gen_to_be_invoked.hashName);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_animationName(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.CharacterAnimationInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
LuaAPI.lua_pushstring(L, gen_to_be_invoked.animationName);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_animationTime(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.CharacterAnimationInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.animationTime);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_keyFrame(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.CharacterAnimationInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
translator.Push(L, gen_to_be_invoked.keyFrame);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_hashName(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.CharacterAnimationInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
gen_to_be_invoked.hashName = LuaAPI.xlua_touint(L, 2);
translator.Update(L, 1, gen_to_be_invoked);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_animationName(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.CharacterAnimationInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
gen_to_be_invoked.animationName = LuaAPI.lua_tostring(L, 2);
translator.Update(L, 1, gen_to_be_invoked);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_animationTime(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.CharacterAnimationInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
gen_to_be_invoked.animationTime = (float)LuaAPI.lua_tonumber(L, 2);
translator.Update(L, 1, gen_to_be_invoked);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_keyFrame(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.CharacterAnimationInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
gen_to_be_invoked.keyFrame = (System.Collections.Generic.List<uint>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List<uint>));
translator.Update(L, 1, gen_to_be_invoked);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
}
}