#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 SnxxzUIDungeonWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(Snxxz.UI.Dungeon); Utils.BeginObjectRegister(type, L, translator, 1, 0, 2, 2); Utils.RegisterFunc(L, Utils.OBJ_META_IDX, "__eq", __EqMeta); Utils.RegisterFunc(L, Utils.GETTER_IDX, "mapId", _g_get_mapId); Utils.RegisterFunc(L, Utils.GETTER_IDX, "lineId", _g_get_lineId); Utils.RegisterFunc(L, Utils.SETTER_IDX, "mapId", _s_set_mapId); Utils.RegisterFunc(L, Utils.SETTER_IDX, "lineId", _s_set_lineId); 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) == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) { int __mapId = LuaAPI.xlua_tointeger(L, 2); int __lineId = LuaAPI.xlua_tointeger(L, 3); Snxxz.UI.Dungeon gen_ret = new Snxxz.UI.Dungeon(__mapId, __lineId); translator.Push(L, gen_ret); return 1; } if (LuaAPI.lua_gettop(L) == 1) { translator.Push(L, default(Snxxz.UI.Dungeon)); return 1; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.Dungeon constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __EqMeta(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if (translator.Assignable(L, 1) && translator.Assignable(L, 2)) { Snxxz.UI.Dungeon leftside;translator.Get(L, 1, out leftside); Snxxz.UI.Dungeon rightside;translator.Get(L, 2, out rightside); LuaAPI.lua_pushboolean(L, leftside == rightside); return 1; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return LuaAPI.luaL_error(L, "invalid arguments to right hand of == operator, need Snxxz.UI.Dungeon!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_mapId(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.Dungeon gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.mapId); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_lineId(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.Dungeon gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.lineId); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_mapId(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.Dungeon gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.mapId = LuaAPI.xlua_tointeger(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_lineId(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Snxxz.UI.Dungeon gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.lineId = LuaAPI.xlua_tointeger(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; } } }