#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 BFBFFingerSnapshotWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(BF.BFFingerSnapshot); Utils.BeginObjectRegister(type, L, translator, 0, 0, 2, 2); Utils.RegisterFunc(L, Utils.GETTER_IDX, "age", _g_get_age); Utils.RegisterFunc(L, Utils.GETTER_IDX, "screenPos", _g_get_screenPos); Utils.RegisterFunc(L, Utils.SETTER_IDX, "age", _s_set_age); Utils.RegisterFunc(L, Utils.SETTER_IDX, "screenPos", _s_set_screenPos); Utils.EndObjectRegister(type, L, translator, null, null, null, null, null); Utils.BeginClassRegister(type, L, __CreateInstance, 5, 1, 1); Utils.RegisterFunc(L, Utils.CLS_IDX, "Pop", _m_Pop_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_IDX, "Push", _m_Push_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_IDX, "TryGetScreenPos", _m_TryGetScreenPos_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_IDX, "GetLowerIndex", _m_GetLowerIndex_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "InactiveSnapshots", _g_get_InactiveSnapshots); Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "InactiveSnapshots", _s_set_InactiveSnapshots); 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.BFFingerSnapshot(); 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.BFFingerSnapshot constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_Pop_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { var gen_ret = BF.BFFingerSnapshot.Pop( ); 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_Push_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { BF.BFFingerSnapshot _snapshot = (BF.BFFingerSnapshot)translator.GetObject(L, 1, typeof(BF.BFFingerSnapshot)); BF.BFFingerSnapshot.Push( _snapshot ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_TryGetScreenPos_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { System.Collections.Generic.List _snapshots = (System.Collections.Generic.List)translator.GetObject(L, 1, typeof(System.Collections.Generic.List)); float _targetAge = (float)LuaAPI.lua_tonumber(L, 2); UnityEngine.Vector2 _screenPos;translator.Get(L, 3, out _screenPos); var gen_ret = BF.BFFingerSnapshot.TryGetScreenPos( _snapshots, _targetAge, ref _screenPos ); LuaAPI.lua_pushboolean(L, gen_ret); translator.PushUnityEngineVector2(L, _screenPos); translator.UpdateUnityEngineVector2(L, 3, _screenPos); return 2; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_GetLowerIndex_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { System.Collections.Generic.List _snapshots = (System.Collections.Generic.List)translator.GetObject(L, 1, typeof(System.Collections.Generic.List)); float _targetAge = (float)LuaAPI.lua_tonumber(L, 2); var gen_ret = BF.BFFingerSnapshot.GetLowerIndex( _snapshots, _targetAge ); LuaAPI.xlua_pushinteger(L, gen_ret); return 1; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_age(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFFingerSnapshot gen_to_be_invoked = (BF.BFFingerSnapshot)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.age); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_screenPos(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFFingerSnapshot gen_to_be_invoked = (BF.BFFingerSnapshot)translator.FastGetCSObj(L, 1); translator.PushUnityEngineVector2(L, gen_to_be_invoked.screenPos); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_InactiveSnapshots(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); translator.Push(L, BF.BFFingerSnapshot.InactiveSnapshots); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_age(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFFingerSnapshot gen_to_be_invoked = (BF.BFFingerSnapshot)translator.FastGetCSObj(L, 1); gen_to_be_invoked.age = (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_screenPos(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFFingerSnapshot gen_to_be_invoked = (BF.BFFingerSnapshot)translator.FastGetCSObj(L, 1); UnityEngine.Vector2 gen_value;translator.Get(L, 2, out gen_value); gen_to_be_invoked.screenPos = 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_InactiveSnapshots(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFFingerSnapshot.InactiveSnapshots = (System.Collections.Generic.List)translator.GetObject(L, 1, typeof(System.Collections.Generic.List)); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } } }