#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 BFBattleHelperWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(BF.BattleHelper); Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(type, L, translator, null, null, null, null, null); Utils.BeginClassRegister(type, L, __CreateInstance, 6, 1, 1); Utils.RegisterFunc(L, Utils.CLS_IDX, "Init", _m_Init_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_IDX, "Pause", _m_Pause_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_IDX, "Resume", _m_Resume_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_IDX, "CreateSequence", _m_CreateSequence_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_IDX, "Clear", _m_Clear_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "pause", _g_get_pause); Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "pause", _s_set_pause); Utils.EndClassRegister(type, L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CreateInstance(RealStatePtr L) { return LuaAPI.luaL_error(L, "BF.BattleHelper does not have a constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_Init_xlua_st_(RealStatePtr L) { try { { BF.BattleHelper.Init( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_Pause_xlua_st_(RealStatePtr L) { try { { BF.BattleHelper.Pause( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_Resume_xlua_st_(RealStatePtr L) { try { { BF.BattleHelper.Resume( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_CreateSequence_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { var gen_ret = BF.BattleHelper.CreateSequence( ); translator.Push(L, gen_ret); return 1; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_Clear_xlua_st_(RealStatePtr L) { try { { BF.BattleHelper.Clear( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_pause(RealStatePtr L) { try { LuaAPI.lua_pushboolean(L, BF.BattleHelper.pause); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_pause(RealStatePtr L) { try { BF.BattleHelper.pause = LuaAPI.lua_toboolean(L, 1); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } } }