#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 BFBattleControlColliderWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(BF.BattleControlCollider); Utils.BeginObjectRegister(type, L, translator, 0, 18, 5, 5); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetColliderEnabled", _m_SetColliderEnabled); Utils.RegisterFunc(L, Utils.METHOD_IDX, "Recycle", _m_Recycle); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetContainer", _m_SetContainer); Utils.RegisterFunc(L, Utils.METHOD_IDX, "RemoveFromContainer", _m_RemoveFromContainer); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetIsSearchByCollider", _m_SetIsSearchByCollider); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetAdmin", _m_SetAdmin); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetUniqueId", _m_GetUniqueId); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetTargetPosition", _m_SetTargetPosition); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetLockTarget", _m_SetLockTarget); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetUpdatePositionWithLockTarget", _m_SetUpdatePositionWithLockTarget); Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitPosition", _m_InitPosition); Utils.RegisterFunc(L, Utils.METHOD_IDX, "CachePosition", _m_CachePosition); Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitBase", _m_InitBase); Utils.RegisterFunc(L, Utils.METHOD_IDX, "Search", _m_Search); Utils.RegisterFunc(L, Utils.METHOD_IDX, "StartSearch", _m_StartSearch); Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddCheckTargetList", _m_AddCheckTargetList); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetSearchTargetsCount", _m_GetSearchTargetsCount); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetTargetId", _m_GetTargetId); Utils.RegisterFunc(L, Utils.GETTER_IDX, "uniqueId", _g_get_uniqueId); Utils.RegisterFunc(L, Utils.GETTER_IDX, "CacheX", _g_get_CacheX); Utils.RegisterFunc(L, Utils.GETTER_IDX, "CacheY", _g_get_CacheY); Utils.RegisterFunc(L, Utils.GETTER_IDX, "CacheZ", _g_get_CacheZ); Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsRecycle", _g_get_IsRecycle); Utils.RegisterFunc(L, Utils.SETTER_IDX, "uniqueId", _s_set_uniqueId); Utils.RegisterFunc(L, Utils.SETTER_IDX, "CacheX", _s_set_CacheX); Utils.RegisterFunc(L, Utils.SETTER_IDX, "CacheY", _s_set_CacheY); Utils.RegisterFunc(L, Utils.SETTER_IDX, "CacheZ", _s_set_CacheZ); Utils.RegisterFunc(L, Utils.SETTER_IDX, "IsRecycle", _s_set_IsRecycle); 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.BattleControlCollider(); 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.BattleControlCollider constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_SetColliderEnabled(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1); { bool _enabled = LuaAPI.lua_toboolean(L, 2); gen_to_be_invoked.SetColliderEnabled( _enabled ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_Recycle(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.Recycle( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_SetContainer(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1); { BF.BattleControlColliderContainer _container = (BF.BattleControlColliderContainer)translator.GetObject(L, 2, typeof(BF.BattleControlColliderContainer)); gen_to_be_invoked.SetContainer( _container ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_RemoveFromContainer(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.RemoveFromContainer( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_SetIsSearchByCollider(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1); { bool _isSearchByCollider = LuaAPI.lua_toboolean(L, 2); gen_to_be_invoked.SetIsSearchByCollider( _isSearchByCollider ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_SetAdmin(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1); { BF.BattleControlUnit _unit = (BF.BattleControlUnit)translator.GetObject(L, 2, typeof(BF.BattleControlUnit)); gen_to_be_invoked.SetAdmin( _unit ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_GetUniqueId(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1); { var gen_ret = gen_to_be_invoked.GetUniqueId( ); 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 _m_SetTargetPosition(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1); { UnityEngine.Vector3 _position;translator.Get(L, 2, out _position); gen_to_be_invoked.SetTargetPosition( _position ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_SetLockTarget(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1); { BF.BattleControlUnit _unit = (BF.BattleControlUnit)translator.GetObject(L, 2, typeof(BF.BattleControlUnit)); gen_to_be_invoked.SetLockTarget( _unit ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_SetUpdatePositionWithLockTarget(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1); { bool _updatePositionWithLockTarget = LuaAPI.lua_toboolean(L, 2); gen_to_be_invoked.SetUpdatePositionWithLockTarget( _updatePositionWithLockTarget ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_InitPosition(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1); { float _x = (float)LuaAPI.lua_tonumber(L, 2); float _y = (float)LuaAPI.lua_tonumber(L, 3); float _z = (float)LuaAPI.lua_tonumber(L, 4); gen_to_be_invoked.InitPosition( _x, _y, _z ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_CachePosition(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.CachePosition( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_InitBase(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.InitBase( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_Search(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1); { int _checkType = LuaAPI.xlua_tointeger(L, 2); float _interval = (float)LuaAPI.lua_tonumber(L, 3); float _duration = (float)LuaAPI.lua_tonumber(L, 4); int _skillId = LuaAPI.xlua_tointeger(L, 5); int _cloneIndex = LuaAPI.xlua_tointeger(L, 6); int _skillEffectIndex = LuaAPI.xlua_tointeger(L, 7); bool _unlimitCount = LuaAPI.lua_toboolean(L, 8); float _delayAimTime = (float)LuaAPI.lua_tonumber(L, 9); float _aimFollowTime = (float)LuaAPI.lua_tonumber(L, 10); float _aimFollowSpeed = (float)LuaAPI.lua_tonumber(L, 11); bool _disposable = LuaAPI.lua_toboolean(L, 12); gen_to_be_invoked.Search( _checkType, _interval, _duration, _skillId, _cloneIndex, _skillEffectIndex, _unlimitCount, _delayAimTime, _aimFollowTime, _aimFollowSpeed, _disposable ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_StartSearch(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.StartSearch( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_AddCheckTargetList(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1); { UnityEngine.GameObject _gameObject = (UnityEngine.GameObject)translator.GetObject(L, 2, typeof(UnityEngine.GameObject)); gen_to_be_invoked.AddCheckTargetList( _gameObject ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_GetSearchTargetsCount(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1); { var gen_ret = gen_to_be_invoked.GetSearchTargetsCount( ); 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 _m_GetTargetId(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1); { int _index = LuaAPI.xlua_tointeger(L, 2); var gen_ret = gen_to_be_invoked.GetTargetId( _index ); 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_uniqueId(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.uniqueId); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_CacheX(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.CacheX); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_CacheY(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.CacheY); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_CacheZ(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.CacheZ); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_IsRecycle(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushboolean(L, gen_to_be_invoked.IsRecycle); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_uniqueId(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1); gen_to_be_invoked.uniqueId = 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_CacheX(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1); gen_to_be_invoked.CacheX = (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_CacheY(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1); gen_to_be_invoked.CacheY = (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_CacheZ(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1); gen_to_be_invoked.CacheZ = (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_IsRecycle(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BattleControlCollider gen_to_be_invoked = (BF.BattleControlCollider)translator.FastGetCSObj(L, 1); gen_to_be_invoked.IsRecycle = LuaAPI.lua_toboolean(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } } }