#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 TaiChiModelWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(TaiChiModel); Utils.BeginObjectRegister(type, L, translator, 0, 11, 10, 1); Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init); Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnBeforePlayerDataInitialize", _m_OnBeforePlayerDataInitialize); Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnInit", _m_UnInit); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetTaiChiModel", _m_SetTaiChiModel); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetTaichiResult", _m_GetTaichiResult); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SendQuest", _m_SendQuest); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetDiceReward", _m_GetDiceReward); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetDiceRewardExp", _m_GetDiceRewardExp); Utils.RegisterFunc(L, Utils.METHOD_IDX, "CheckEnterError", _m_CheckEnterError); Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefreshTaiChiModel", _e_RefreshTaiChiModel); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetResultEvent", _e_GetResultEvent); Utils.RegisterFunc(L, Utils.GETTER_IDX, "dailyQuestModel", _g_get_dailyQuestModel); Utils.RegisterFunc(L, Utils.GETTER_IDX, "sumFreeNum", _g_get_sumFreeNum); Utils.RegisterFunc(L, Utils.GETTER_IDX, "sumPlayNum", _g_get_sumPlayNum); Utils.RegisterFunc(L, Utils.GETTER_IDX, "taiChiResultNum", _g_get_taiChiResultNum); Utils.RegisterFunc(L, Utils.GETTER_IDX, "diceType", _g_get_diceType); Utils.RegisterFunc(L, Utils.GETTER_IDX, "useFreeCnt", _g_get_useFreeCnt); Utils.RegisterFunc(L, Utils.GETTER_IDX, "taiChiNum", _g_get_taiChiNum); Utils.RegisterFunc(L, Utils.GETTER_IDX, "getResultNum", _g_get_getResultNum); Utils.RegisterFunc(L, Utils.GETTER_IDX, "TaiChiDailyTaskID", _g_get_TaiChiDailyTaskID); Utils.RegisterFunc(L, Utils.GETTER_IDX, "resultNumlist", _g_get_resultNumlist); Utils.RegisterFunc(L, Utils.SETTER_IDX, "resultNumlist", _s_set_resultNumlist); 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) { TaiChiModel gen_ret = new TaiChiModel(); 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 TaiChiModel constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_Init(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaiChiModel gen_to_be_invoked = (TaiChiModel)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.Init( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_OnBeforePlayerDataInitialize(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaiChiModel gen_to_be_invoked = (TaiChiModel)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.OnBeforePlayerDataInitialize( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_UnInit(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaiChiModel gen_to_be_invoked = (TaiChiModel)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.UnInit( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_SetTaiChiModel(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaiChiModel gen_to_be_invoked = (TaiChiModel)translator.FastGetCSObj(L, 1); { HAB22_tagMCDiceExResult _result = (HAB22_tagMCDiceExResult)translator.GetObject(L, 2, typeof(HAB22_tagMCDiceExResult)); gen_to_be_invoked.SetTaiChiModel( _result ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_GetTaichiResult(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaiChiModel gen_to_be_invoked = (TaiChiModel)translator.FastGetCSObj(L, 1); { int _taichiNum = LuaAPI.xlua_tointeger(L, 2); gen_to_be_invoked.GetTaichiResult( _taichiNum ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_SendQuest(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaiChiModel gen_to_be_invoked = (TaiChiModel)translator.FastGetCSObj(L, 1); { int _type = LuaAPI.xlua_tointeger(L, 2); gen_to_be_invoked.SendQuest( _type ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_GetDiceReward(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaiChiModel gen_to_be_invoked = (TaiChiModel)translator.FastGetCSObj(L, 1); { int _taiChiNum = LuaAPI.xlua_tointeger(L, 2); DiceReward gen_ret = gen_to_be_invoked.GetDiceReward( _taiChiNum ); 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_GetDiceRewardExp(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaiChiModel gen_to_be_invoked = (TaiChiModel)translator.FastGetCSObj(L, 1); { string _exp = LuaAPI.lua_tostring(L, 2); long gen_ret = gen_to_be_invoked.GetDiceRewardExp( _exp ); LuaAPI.lua_pushint64(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_CheckEnterError(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaiChiModel gen_to_be_invoked = (TaiChiModel)translator.FastGetCSObj(L, 1); { int _error; bool gen_ret = gen_to_be_invoked.CheckEnterError( out _error ); LuaAPI.lua_pushboolean(L, gen_ret); LuaAPI.xlua_pushinteger(L, _error); return 2; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_dailyQuestModel(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaiChiModel gen_to_be_invoked = (TaiChiModel)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.dailyQuestModel); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_sumFreeNum(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaiChiModel gen_to_be_invoked = (TaiChiModel)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.sumFreeNum); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_sumPlayNum(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaiChiModel gen_to_be_invoked = (TaiChiModel)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.sumPlayNum); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_taiChiResultNum(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaiChiModel gen_to_be_invoked = (TaiChiModel)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushstring(L, gen_to_be_invoked.taiChiResultNum); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_diceType(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaiChiModel gen_to_be_invoked = (TaiChiModel)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.diceType); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_useFreeCnt(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaiChiModel gen_to_be_invoked = (TaiChiModel)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.useFreeCnt); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_taiChiNum(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaiChiModel gen_to_be_invoked = (TaiChiModel)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.taiChiNum); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_getResultNum(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaiChiModel gen_to_be_invoked = (TaiChiModel)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.getResultNum); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_TaiChiDailyTaskID(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaiChiModel gen_to_be_invoked = (TaiChiModel)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.TaiChiDailyTaskID); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_resultNumlist(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaiChiModel gen_to_be_invoked = (TaiChiModel)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.resultNumlist); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_resultNumlist(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TaiChiModel gen_to_be_invoked = (TaiChiModel)translator.FastGetCSObj(L, 1); gen_to_be_invoked.resultNumlist = (System.Collections.Generic.List)translator.GetObject(L, 2, typeof(System.Collections.Generic.List)); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _e_RefreshTaiChiModel(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); TaiChiModel gen_to_be_invoked = (TaiChiModel)translator.FastGetCSObj(L, 1); System.Action gen_delegate = translator.GetDelegate(L, 3); if (gen_delegate == null) { return LuaAPI.luaL_error(L, "#3 need System.Action!"); } if (gen_param_count == 3) { if (LuaAPI.xlua_is_eq_str(L, 2, "+")) { gen_to_be_invoked.RefreshTaiChiModel += gen_delegate; return 0; } if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { gen_to_be_invoked.RefreshTaiChiModel -= gen_delegate; return 0; } } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } LuaAPI.luaL_error(L, "invalid arguments to TaiChiModel.RefreshTaiChiModel!"); return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _e_GetResultEvent(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); TaiChiModel gen_to_be_invoked = (TaiChiModel)translator.FastGetCSObj(L, 1); System.Action gen_delegate = translator.GetDelegate(L, 3); if (gen_delegate == null) { return LuaAPI.luaL_error(L, "#3 need System.Action!"); } if (gen_param_count == 3) { if (LuaAPI.xlua_is_eq_str(L, 2, "+")) { gen_to_be_invoked.GetResultEvent += gen_delegate; return 0; } if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { gen_to_be_invoked.GetResultEvent -= gen_delegate; return 0; } } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } LuaAPI.luaL_error(L, "invalid arguments to TaiChiModel.GetResultEvent!"); return 0; } } }