#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 BFEffectHelperWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(BF.EffectHelper); Utils.BeginObjectRegister(type, L, translator, 0, 18, 5, 5); Utils.RegisterFunc(L, Utils.METHOD_IDX, "InitParticleSystemRendererList", _m_InitParticleSystemRendererList); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetLocalPosition", _m_SetLocalPosition); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetPosition", _m_SetPosition); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetLocalEulerAngles", _m_SetLocalEulerAngles); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetEulerAngles", _m_SetEulerAngles); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetLocalScale", _m_SetLocalScale); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetSortingOrder", _m_SetSortingOrder); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetUIOrder", _m_SetUIOrder); Utils.RegisterFunc(L, Utils.METHOD_IDX, "ChangeSortingOrderToFudge", _m_ChangeSortingOrderToFudge); Utils.RegisterFunc(L, Utils.METHOD_IDX, "Play", _m_Play); Utils.RegisterFunc(L, Utils.METHOD_IDX, "Clear", _m_Clear); Utils.RegisterFunc(L, Utils.METHOD_IDX, "Stop", _m_Stop); Utils.RegisterFunc(L, Utils.METHOD_IDX, "StopAndClear", _m_StopAndClear); Utils.RegisterFunc(L, Utils.METHOD_IDX, "ClearTrail", _m_ClearTrail); Utils.RegisterFunc(L, Utils.METHOD_IDX, "Pause", _m_Pause); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetTimeScale", _m_SetTimeScale); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetParticleActive", _m_SetParticleActive); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetIsParticleActive", _m_GetIsParticleActive); Utils.RegisterFunc(L, Utils.GETTER_IDX, "RootParticle", _g_get_RootParticle); Utils.RegisterFunc(L, Utils.GETTER_IDX, "EffectDuration", _g_get_EffectDuration); Utils.RegisterFunc(L, Utils.GETTER_IDX, "AnimatorCount", _g_get_AnimatorCount); Utils.RegisterFunc(L, Utils.GETTER_IDX, "TrailRendererCount", _g_get_TrailRendererCount); Utils.RegisterFunc(L, Utils.GETTER_IDX, "EulerAnglesFlip", _g_get_EulerAnglesFlip); Utils.RegisterFunc(L, Utils.SETTER_IDX, "RootParticle", _s_set_RootParticle); Utils.RegisterFunc(L, Utils.SETTER_IDX, "EffectDuration", _s_set_EffectDuration); Utils.RegisterFunc(L, Utils.SETTER_IDX, "AnimatorCount", _s_set_AnimatorCount); Utils.RegisterFunc(L, Utils.SETTER_IDX, "TrailRendererCount", _s_set_TrailRendererCount); Utils.RegisterFunc(L, Utils.SETTER_IDX, "EulerAnglesFlip", _s_set_EulerAnglesFlip); 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.EffectHelper(); 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.EffectHelper constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_InitParticleSystemRendererList(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.EffectHelper gen_to_be_invoked = (BF.EffectHelper)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.InitParticleSystemRendererList( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_SetLocalPosition(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.EffectHelper gen_to_be_invoked = (BF.EffectHelper)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.SetLocalPosition( _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_SetPosition(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.EffectHelper gen_to_be_invoked = (BF.EffectHelper)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.SetPosition( _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_SetLocalEulerAngles(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.EffectHelper gen_to_be_invoked = (BF.EffectHelper)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.SetLocalEulerAngles( _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_SetEulerAngles(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.EffectHelper gen_to_be_invoked = (BF.EffectHelper)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.SetEulerAngles( _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_SetLocalScale(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.EffectHelper gen_to_be_invoked = (BF.EffectHelper)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.SetLocalScale( _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_SetSortingOrder(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.EffectHelper gen_to_be_invoked = (BF.EffectHelper)translator.FastGetCSObj(L, 1); { int _uiOrder = LuaAPI.xlua_tointeger(L, 2); int _order = LuaAPI.xlua_tointeger(L, 3); gen_to_be_invoked.SetSortingOrder( _uiOrder, _order ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_SetUIOrder(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.EffectHelper gen_to_be_invoked = (BF.EffectHelper)translator.FastGetCSObj(L, 1); { int _uiOrder = LuaAPI.xlua_tointeger(L, 2); gen_to_be_invoked.SetUIOrder( _uiOrder ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_ChangeSortingOrderToFudge(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.EffectHelper gen_to_be_invoked = (BF.EffectHelper)translator.FastGetCSObj(L, 1); { int _order = LuaAPI.xlua_tointeger(L, 2); float _coefficient = (float)LuaAPI.lua_tonumber(L, 3); gen_to_be_invoked.ChangeSortingOrderToFudge( _order, _coefficient ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_Play(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.EffectHelper gen_to_be_invoked = (BF.EffectHelper)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.Play( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_Clear(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.EffectHelper gen_to_be_invoked = (BF.EffectHelper)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.Clear( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_Stop(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.EffectHelper gen_to_be_invoked = (BF.EffectHelper)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.Stop( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_StopAndClear(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.EffectHelper gen_to_be_invoked = (BF.EffectHelper)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.StopAndClear( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_ClearTrail(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.EffectHelper gen_to_be_invoked = (BF.EffectHelper)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.ClearTrail( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_Pause(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.EffectHelper gen_to_be_invoked = (BF.EffectHelper)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.Pause( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_SetTimeScale(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.EffectHelper gen_to_be_invoked = (BF.EffectHelper)translator.FastGetCSObj(L, 1); { float _timeScale = (float)LuaAPI.lua_tonumber(L, 2); gen_to_be_invoked.SetTimeScale( _timeScale ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_SetParticleActive(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.EffectHelper gen_to_be_invoked = (BF.EffectHelper)translator.FastGetCSObj(L, 1); { bool _active = LuaAPI.lua_toboolean(L, 2); gen_to_be_invoked.SetParticleActive( _active ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_GetIsParticleActive(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.EffectHelper gen_to_be_invoked = (BF.EffectHelper)translator.FastGetCSObj(L, 1); { var gen_ret = gen_to_be_invoked.GetIsParticleActive( ); LuaAPI.lua_pushboolean(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_RootParticle(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.EffectHelper gen_to_be_invoked = (BF.EffectHelper)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.RootParticle); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_EffectDuration(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.EffectHelper gen_to_be_invoked = (BF.EffectHelper)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.EffectDuration); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_AnimatorCount(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.EffectHelper gen_to_be_invoked = (BF.EffectHelper)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.AnimatorCount); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_TrailRendererCount(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.EffectHelper gen_to_be_invoked = (BF.EffectHelper)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.TrailRendererCount); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_EulerAnglesFlip(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.EffectHelper gen_to_be_invoked = (BF.EffectHelper)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushboolean(L, gen_to_be_invoked.EulerAnglesFlip); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_RootParticle(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.EffectHelper gen_to_be_invoked = (BF.EffectHelper)translator.FastGetCSObj(L, 1); gen_to_be_invoked.RootParticle = (UnityEngine.ParticleSystem)translator.GetObject(L, 2, typeof(UnityEngine.ParticleSystem)); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_EffectDuration(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.EffectHelper gen_to_be_invoked = (BF.EffectHelper)translator.FastGetCSObj(L, 1); gen_to_be_invoked.EffectDuration = (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_AnimatorCount(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.EffectHelper gen_to_be_invoked = (BF.EffectHelper)translator.FastGetCSObj(L, 1); gen_to_be_invoked.AnimatorCount = 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_TrailRendererCount(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.EffectHelper gen_to_be_invoked = (BF.EffectHelper)translator.FastGetCSObj(L, 1); gen_to_be_invoked.TrailRendererCount = 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_EulerAnglesFlip(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.EffectHelper gen_to_be_invoked = (BF.EffectHelper)translator.FastGetCSObj(L, 1); gen_to_be_invoked.EulerAnglesFlip = LuaAPI.lua_toboolean(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } } }