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

171 lines
4.5 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 BFBattleControlMonsterExtendWrap
{
public static void __Register(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
System.Type type = typeof(BF.BattleControlMonsterExtend);
Utils.BeginObjectRegister(type, L, translator, 0, 3, 0, 0);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetControl", _m_SetControl);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnRecycle", _m_OnRecycle);
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.BattleControlMonsterExtend();
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.BattleControlMonsterExtend constructor!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_SetControl(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.BattleControlMonsterExtend gen_to_be_invoked = (BF.BattleControlMonsterExtend)translator.FastGetCSObj(L, 1);
{
BF.BattleControlMonster _control = (BF.BattleControlMonster)translator.GetObject(L, 2, typeof(BF.BattleControlMonster));
gen_to_be_invoked.SetControl( _control );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_Init(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.BattleControlMonsterExtend gen_to_be_invoked = (BF.BattleControlMonsterExtend)translator.FastGetCSObj(L, 1);
{
long _id = LuaAPI.lua_toint64(L, 2);
gen_to_be_invoked.Init( _id );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_OnRecycle(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
BF.BattleControlMonsterExtend gen_to_be_invoked = (BF.BattleControlMonsterExtend)translator.FastGetCSObj(L, 1);
{
gen_to_be_invoked.OnRecycle( );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
}
}