#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 UnityEngineFrustumPlanesWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(UnityEngine.FrustumPlanes); Utils.BeginObjectRegister(type, L, translator, 0, 0, 6, 6); Utils.RegisterFunc(L, Utils.GETTER_IDX, "left", _g_get_left); Utils.RegisterFunc(L, Utils.GETTER_IDX, "right", _g_get_right); Utils.RegisterFunc(L, Utils.GETTER_IDX, "bottom", _g_get_bottom); Utils.RegisterFunc(L, Utils.GETTER_IDX, "top", _g_get_top); Utils.RegisterFunc(L, Utils.GETTER_IDX, "zNear", _g_get_zNear); Utils.RegisterFunc(L, Utils.GETTER_IDX, "zFar", _g_get_zFar); Utils.RegisterFunc(L, Utils.SETTER_IDX, "left", _s_set_left); Utils.RegisterFunc(L, Utils.SETTER_IDX, "right", _s_set_right); Utils.RegisterFunc(L, Utils.SETTER_IDX, "bottom", _s_set_bottom); Utils.RegisterFunc(L, Utils.SETTER_IDX, "top", _s_set_top); Utils.RegisterFunc(L, Utils.SETTER_IDX, "zNear", _s_set_zNear); Utils.RegisterFunc(L, Utils.SETTER_IDX, "zFar", _s_set_zFar); 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.FrustumPlanes)); 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.FrustumPlanes constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_left(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.FrustumPlanes gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.left); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_right(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.FrustumPlanes gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.right); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_bottom(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.FrustumPlanes gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.bottom); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_top(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.FrustumPlanes gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.top); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_zNear(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.FrustumPlanes gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.zNear); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_zFar(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.FrustumPlanes gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.zFar); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_left(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.FrustumPlanes gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.left = (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_right(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.FrustumPlanes gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.right = (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_bottom(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.FrustumPlanes gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.bottom = (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_top(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.FrustumPlanes gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.top = (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_zNear(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.FrustumPlanes gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.zNear = (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_zFar(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.FrustumPlanes gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.zFar = (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; } } }