#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 BFBFCellWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(BF.BFCell); Utils.BeginObjectRegister(type, L, translator, 0, 0, 7, 6); Utils.RegisterFunc(L, Utils.GETTER_IDX, "AnchoredPosition", _g_get_AnchoredPosition); Utils.RegisterFunc(L, Utils.GETTER_IDX, "SizeDelta", _g_get_SizeDelta); Utils.RegisterFunc(L, Utils.GETTER_IDX, "Width", _g_get_Width); Utils.RegisterFunc(L, Utils.GETTER_IDX, "Height", _g_get_Height); Utils.RegisterFunc(L, Utils.GETTER_IDX, "CachedRectTransform", _g_get_CachedRectTransform); Utils.RegisterFunc(L, Utils.GETTER_IDX, "dataIndex", _g_get_dataIndex); Utils.RegisterFunc(L, Utils.GETTER_IDX, "objIndex", _g_get_objIndex); Utils.RegisterFunc(L, Utils.SETTER_IDX, "AnchoredPosition", _s_set_AnchoredPosition); Utils.RegisterFunc(L, Utils.SETTER_IDX, "SizeDelta", _s_set_SizeDelta); Utils.RegisterFunc(L, Utils.SETTER_IDX, "Width", _s_set_Width); Utils.RegisterFunc(L, Utils.SETTER_IDX, "Height", _s_set_Height); Utils.RegisterFunc(L, Utils.SETTER_IDX, "dataIndex", _s_set_dataIndex); Utils.RegisterFunc(L, Utils.SETTER_IDX, "objIndex", _s_set_objIndex); 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.BFCell(); 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.BFCell constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_AnchoredPosition(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFCell gen_to_be_invoked = (BF.BFCell)translator.FastGetCSObj(L, 1); translator.PushUnityEngineVector2(L, gen_to_be_invoked.AnchoredPosition); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_SizeDelta(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFCell gen_to_be_invoked = (BF.BFCell)translator.FastGetCSObj(L, 1); translator.PushUnityEngineVector2(L, gen_to_be_invoked.SizeDelta); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_Width(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFCell gen_to_be_invoked = (BF.BFCell)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.Width); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_Height(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFCell gen_to_be_invoked = (BF.BFCell)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.Height); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_CachedRectTransform(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFCell gen_to_be_invoked = (BF.BFCell)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.CachedRectTransform); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_dataIndex(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFCell gen_to_be_invoked = (BF.BFCell)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.dataIndex); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_objIndex(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFCell gen_to_be_invoked = (BF.BFCell)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.objIndex); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_AnchoredPosition(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFCell gen_to_be_invoked = (BF.BFCell)translator.FastGetCSObj(L, 1); UnityEngine.Vector2 gen_value;translator.Get(L, 2, out gen_value); gen_to_be_invoked.AnchoredPosition = gen_value; } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_SizeDelta(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFCell gen_to_be_invoked = (BF.BFCell)translator.FastGetCSObj(L, 1); UnityEngine.Vector2 gen_value;translator.Get(L, 2, out gen_value); gen_to_be_invoked.SizeDelta = gen_value; } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_Width(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFCell gen_to_be_invoked = (BF.BFCell)translator.FastGetCSObj(L, 1); gen_to_be_invoked.Width = (float)LuaAPI.lua_tonumber(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_Height(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFCell gen_to_be_invoked = (BF.BFCell)translator.FastGetCSObj(L, 1); gen_to_be_invoked.Height = (float)LuaAPI.lua_tonumber(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_dataIndex(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFCell gen_to_be_invoked = (BF.BFCell)translator.FastGetCSObj(L, 1); gen_to_be_invoked.dataIndex = LuaAPI.xlua_tointeger(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_objIndex(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFCell gen_to_be_invoked = (BF.BFCell)translator.FastGetCSObj(L, 1); gen_to_be_invoked.objIndex = LuaAPI.xlua_tointeger(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } } }