#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 UnityEngineParticleSystemLightsModuleWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(UnityEngine.ParticleSystem.LightsModule); Utils.BeginObjectRegister(type, L, translator, 0, 0, 12, 12); Utils.RegisterFunc(L, Utils.GETTER_IDX, "enabled", _g_get_enabled); Utils.RegisterFunc(L, Utils.GETTER_IDX, "ratio", _g_get_ratio); Utils.RegisterFunc(L, Utils.GETTER_IDX, "useRandomDistribution", _g_get_useRandomDistribution); Utils.RegisterFunc(L, Utils.GETTER_IDX, "light", _g_get_light); Utils.RegisterFunc(L, Utils.GETTER_IDX, "useParticleColor", _g_get_useParticleColor); Utils.RegisterFunc(L, Utils.GETTER_IDX, "sizeAffectsRange", _g_get_sizeAffectsRange); Utils.RegisterFunc(L, Utils.GETTER_IDX, "alphaAffectsIntensity", _g_get_alphaAffectsIntensity); Utils.RegisterFunc(L, Utils.GETTER_IDX, "range", _g_get_range); Utils.RegisterFunc(L, Utils.GETTER_IDX, "rangeMultiplier", _g_get_rangeMultiplier); Utils.RegisterFunc(L, Utils.GETTER_IDX, "intensity", _g_get_intensity); Utils.RegisterFunc(L, Utils.GETTER_IDX, "intensityMultiplier", _g_get_intensityMultiplier); Utils.RegisterFunc(L, Utils.GETTER_IDX, "maxLights", _g_get_maxLights); Utils.RegisterFunc(L, Utils.SETTER_IDX, "enabled", _s_set_enabled); Utils.RegisterFunc(L, Utils.SETTER_IDX, "ratio", _s_set_ratio); Utils.RegisterFunc(L, Utils.SETTER_IDX, "useRandomDistribution", _s_set_useRandomDistribution); Utils.RegisterFunc(L, Utils.SETTER_IDX, "light", _s_set_light); Utils.RegisterFunc(L, Utils.SETTER_IDX, "useParticleColor", _s_set_useParticleColor); Utils.RegisterFunc(L, Utils.SETTER_IDX, "sizeAffectsRange", _s_set_sizeAffectsRange); Utils.RegisterFunc(L, Utils.SETTER_IDX, "alphaAffectsIntensity", _s_set_alphaAffectsIntensity); Utils.RegisterFunc(L, Utils.SETTER_IDX, "range", _s_set_range); Utils.RegisterFunc(L, Utils.SETTER_IDX, "rangeMultiplier", _s_set_rangeMultiplier); Utils.RegisterFunc(L, Utils.SETTER_IDX, "intensity", _s_set_intensity); Utils.RegisterFunc(L, Utils.SETTER_IDX, "intensityMultiplier", _s_set_intensityMultiplier); Utils.RegisterFunc(L, Utils.SETTER_IDX, "maxLights", _s_set_maxLights); 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) { translator.Push(L, default(UnityEngine.ParticleSystem.LightsModule)); return 1; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.ParticleSystem.LightsModule constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_enabled(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ParticleSystem.LightsModule gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); LuaAPI.lua_pushboolean(L, gen_to_be_invoked.enabled); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_ratio(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ParticleSystem.LightsModule gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.ratio); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_useRandomDistribution(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ParticleSystem.LightsModule gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); LuaAPI.lua_pushboolean(L, gen_to_be_invoked.useRandomDistribution); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_light(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ParticleSystem.LightsModule gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); translator.Push(L, gen_to_be_invoked.light); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_useParticleColor(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ParticleSystem.LightsModule gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); LuaAPI.lua_pushboolean(L, gen_to_be_invoked.useParticleColor); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_sizeAffectsRange(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ParticleSystem.LightsModule gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); LuaAPI.lua_pushboolean(L, gen_to_be_invoked.sizeAffectsRange); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_alphaAffectsIntensity(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ParticleSystem.LightsModule gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); LuaAPI.lua_pushboolean(L, gen_to_be_invoked.alphaAffectsIntensity); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_range(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ParticleSystem.LightsModule gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); translator.Push(L, gen_to_be_invoked.range); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_rangeMultiplier(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ParticleSystem.LightsModule gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.rangeMultiplier); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_intensity(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ParticleSystem.LightsModule gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); translator.Push(L, gen_to_be_invoked.intensity); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_intensityMultiplier(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ParticleSystem.LightsModule gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.intensityMultiplier); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_maxLights(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ParticleSystem.LightsModule gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.maxLights); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_enabled(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ParticleSystem.LightsModule gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.enabled = LuaAPI.lua_toboolean(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_ratio(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ParticleSystem.LightsModule gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.ratio = (float)LuaAPI.lua_tonumber(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_useRandomDistribution(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ParticleSystem.LightsModule gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.useRandomDistribution = LuaAPI.lua_toboolean(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_light(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ParticleSystem.LightsModule gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.light = (UnityEngine.Light)translator.GetObject(L, 2, typeof(UnityEngine.Light)); 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_useParticleColor(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ParticleSystem.LightsModule gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.useParticleColor = LuaAPI.lua_toboolean(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_sizeAffectsRange(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ParticleSystem.LightsModule gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.sizeAffectsRange = LuaAPI.lua_toboolean(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_alphaAffectsIntensity(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ParticleSystem.LightsModule gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.alphaAffectsIntensity = LuaAPI.lua_toboolean(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_range(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ParticleSystem.LightsModule gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); UnityEngine.ParticleSystem.MinMaxCurve gen_value;translator.Get(L, 2, out gen_value); gen_to_be_invoked.range = gen_value; 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_rangeMultiplier(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ParticleSystem.LightsModule gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.rangeMultiplier = (float)LuaAPI.lua_tonumber(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_intensity(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ParticleSystem.LightsModule gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); UnityEngine.ParticleSystem.MinMaxCurve gen_value;translator.Get(L, 2, out gen_value); gen_to_be_invoked.intensity = gen_value; 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_intensityMultiplier(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ParticleSystem.LightsModule gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.intensityMultiplier = (float)LuaAPI.lua_tonumber(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_maxLights(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.ParticleSystem.LightsModule gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.maxLights = 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; } } }