#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 UnityEngineWindZoneWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(UnityEngine.WindZone); Utils.BeginObjectRegister(type, L, translator, 0, 0, 6, 6); Utils.RegisterFunc(L, Utils.GETTER_IDX, "mode", _g_get_mode); Utils.RegisterFunc(L, Utils.GETTER_IDX, "radius", _g_get_radius); Utils.RegisterFunc(L, Utils.GETTER_IDX, "windMain", _g_get_windMain); Utils.RegisterFunc(L, Utils.GETTER_IDX, "windTurbulence", _g_get_windTurbulence); Utils.RegisterFunc(L, Utils.GETTER_IDX, "windPulseMagnitude", _g_get_windPulseMagnitude); Utils.RegisterFunc(L, Utils.GETTER_IDX, "windPulseFrequency", _g_get_windPulseFrequency); Utils.RegisterFunc(L, Utils.SETTER_IDX, "mode", _s_set_mode); Utils.RegisterFunc(L, Utils.SETTER_IDX, "radius", _s_set_radius); Utils.RegisterFunc(L, Utils.SETTER_IDX, "windMain", _s_set_windMain); Utils.RegisterFunc(L, Utils.SETTER_IDX, "windTurbulence", _s_set_windTurbulence); Utils.RegisterFunc(L, Utils.SETTER_IDX, "windPulseMagnitude", _s_set_windPulseMagnitude); Utils.RegisterFunc(L, Utils.SETTER_IDX, "windPulseFrequency", _s_set_windPulseFrequency); 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 UnityEngine.WindZone(); 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 UnityEngine.WindZone constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_mode(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.WindZone gen_to_be_invoked = (UnityEngine.WindZone)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.mode); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_radius(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.WindZone gen_to_be_invoked = (UnityEngine.WindZone)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.radius); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_windMain(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.WindZone gen_to_be_invoked = (UnityEngine.WindZone)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.windMain); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_windTurbulence(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.WindZone gen_to_be_invoked = (UnityEngine.WindZone)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.windTurbulence); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_windPulseMagnitude(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.WindZone gen_to_be_invoked = (UnityEngine.WindZone)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.windPulseMagnitude); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_windPulseFrequency(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.WindZone gen_to_be_invoked = (UnityEngine.WindZone)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.windPulseFrequency); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_mode(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.WindZone gen_to_be_invoked = (UnityEngine.WindZone)translator.FastGetCSObj(L, 1); UnityEngine.WindZoneMode gen_value;translator.Get(L, 2, out gen_value); gen_to_be_invoked.mode = 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_radius(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.WindZone gen_to_be_invoked = (UnityEngine.WindZone)translator.FastGetCSObj(L, 1); gen_to_be_invoked.radius = (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_windMain(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.WindZone gen_to_be_invoked = (UnityEngine.WindZone)translator.FastGetCSObj(L, 1); gen_to_be_invoked.windMain = (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_windTurbulence(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.WindZone gen_to_be_invoked = (UnityEngine.WindZone)translator.FastGetCSObj(L, 1); gen_to_be_invoked.windTurbulence = (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_windPulseMagnitude(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.WindZone gen_to_be_invoked = (UnityEngine.WindZone)translator.FastGetCSObj(L, 1); gen_to_be_invoked.windPulseMagnitude = (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_windPulseFrequency(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.WindZone gen_to_be_invoked = (UnityEngine.WindZone)translator.FastGetCSObj(L, 1); gen_to_be_invoked.windPulseFrequency = (float)LuaAPI.lua_tonumber(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } } }