488 lines
17 KiB
C#
488 lines
17 KiB
C#
#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 UnityEngineCullingGroupWrap
|
|
{
|
|
public static void __Register(RealStatePtr L)
|
|
{
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
System.Type type = typeof(UnityEngine.CullingGroup);
|
|
Utils.BeginObjectRegister(type, L, translator, 0, 9, 3, 3);
|
|
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Dispose", _m_Dispose);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetBoundingSpheres", _m_SetBoundingSpheres);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetBoundingSphereCount", _m_SetBoundingSphereCount);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "EraseSwapBack", _m_EraseSwapBack);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "QueryIndices", _m_QueryIndices);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsVisible", _m_IsVisible);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetDistance", _m_GetDistance);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetBoundingDistances", _m_SetBoundingDistances);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetDistanceReferencePoint", _m_SetDistanceReferencePoint);
|
|
|
|
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "onStateChanged", _g_get_onStateChanged);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "enabled", _g_get_enabled);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "targetCamera", _g_get_targetCamera);
|
|
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "onStateChanged", _s_set_onStateChanged);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "enabled", _s_set_enabled);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "targetCamera", _s_set_targetCamera);
|
|
|
|
|
|
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.CullingGroup();
|
|
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.CullingGroup constructor!");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_Dispose(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
UnityEngine.CullingGroup gen_to_be_invoked = (UnityEngine.CullingGroup)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.Dispose( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetBoundingSpheres(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
UnityEngine.CullingGroup gen_to_be_invoked = (UnityEngine.CullingGroup)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
UnityEngine.BoundingSphere[] _array = (UnityEngine.BoundingSphere[])translator.GetObject(L, 2, typeof(UnityEngine.BoundingSphere[]));
|
|
|
|
gen_to_be_invoked.SetBoundingSpheres( _array );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetBoundingSphereCount(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
UnityEngine.CullingGroup gen_to_be_invoked = (UnityEngine.CullingGroup)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _count = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
gen_to_be_invoked.SetBoundingSphereCount( _count );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_EraseSwapBack(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
UnityEngine.CullingGroup gen_to_be_invoked = (UnityEngine.CullingGroup)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _index = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
gen_to_be_invoked.EraseSwapBack( _index );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_QueryIndices(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
UnityEngine.CullingGroup gen_to_be_invoked = (UnityEngine.CullingGroup)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
|
|
if(gen_param_count == 4&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 2)&& translator.Assignable<int[]>(L, 3)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4))
|
|
{
|
|
bool _visible = LuaAPI.lua_toboolean(L, 2);
|
|
int[] _result = (int[])translator.GetObject(L, 3, typeof(int[]));
|
|
int _firstIndex = LuaAPI.xlua_tointeger(L, 4);
|
|
|
|
var gen_ret = gen_to_be_invoked.QueryIndices( _visible, _result, _firstIndex );
|
|
LuaAPI.xlua_pushinteger(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
if(gen_param_count == 4&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& translator.Assignable<int[]>(L, 3)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4))
|
|
{
|
|
int _distanceIndex = LuaAPI.xlua_tointeger(L, 2);
|
|
int[] _result = (int[])translator.GetObject(L, 3, typeof(int[]));
|
|
int _firstIndex = LuaAPI.xlua_tointeger(L, 4);
|
|
|
|
var gen_ret = gen_to_be_invoked.QueryIndices( _distanceIndex, _result, _firstIndex );
|
|
LuaAPI.xlua_pushinteger(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
if(gen_param_count == 5&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)&& translator.Assignable<int[]>(L, 4)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5))
|
|
{
|
|
bool _visible = LuaAPI.lua_toboolean(L, 2);
|
|
int _distanceIndex = LuaAPI.xlua_tointeger(L, 3);
|
|
int[] _result = (int[])translator.GetObject(L, 4, typeof(int[]));
|
|
int _firstIndex = LuaAPI.xlua_tointeger(L, 5);
|
|
|
|
var gen_ret = gen_to_be_invoked.QueryIndices( _visible, _distanceIndex, _result, _firstIndex );
|
|
LuaAPI.xlua_pushinteger(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.CullingGroup.QueryIndices!");
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_IsVisible(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
UnityEngine.CullingGroup gen_to_be_invoked = (UnityEngine.CullingGroup)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _index = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.IsVisible( _index );
|
|
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 _m_GetDistance(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
UnityEngine.CullingGroup gen_to_be_invoked = (UnityEngine.CullingGroup)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _index = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
var gen_ret = gen_to_be_invoked.GetDistance( _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 _m_SetBoundingDistances(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
UnityEngine.CullingGroup gen_to_be_invoked = (UnityEngine.CullingGroup)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
float[] _distances = (float[])translator.GetObject(L, 2, typeof(float[]));
|
|
|
|
gen_to_be_invoked.SetBoundingDistances( _distances );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetDistanceReferencePoint(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
UnityEngine.CullingGroup gen_to_be_invoked = (UnityEngine.CullingGroup)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
|
|
if(gen_param_count == 2&& translator.Assignable<UnityEngine.Vector3>(L, 2))
|
|
{
|
|
UnityEngine.Vector3 _point;translator.Get(L, 2, out _point);
|
|
|
|
gen_to_be_invoked.SetDistanceReferencePoint( _point );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
if(gen_param_count == 2&& translator.Assignable<UnityEngine.Transform>(L, 2))
|
|
{
|
|
UnityEngine.Transform _transform = (UnityEngine.Transform)translator.GetObject(L, 2, typeof(UnityEngine.Transform));
|
|
|
|
gen_to_be_invoked.SetDistanceReferencePoint( _transform );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
return LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.CullingGroup.SetDistanceReferencePoint!");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_onStateChanged(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
UnityEngine.CullingGroup gen_to_be_invoked = (UnityEngine.CullingGroup)translator.FastGetCSObj(L, 1);
|
|
translator.Push(L, gen_to_be_invoked.onStateChanged);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_enabled(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
UnityEngine.CullingGroup gen_to_be_invoked = (UnityEngine.CullingGroup)translator.FastGetCSObj(L, 1);
|
|
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_targetCamera(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
UnityEngine.CullingGroup gen_to_be_invoked = (UnityEngine.CullingGroup)translator.FastGetCSObj(L, 1);
|
|
translator.Push(L, gen_to_be_invoked.targetCamera);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_onStateChanged(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
UnityEngine.CullingGroup gen_to_be_invoked = (UnityEngine.CullingGroup)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.onStateChanged = translator.GetDelegate<UnityEngine.CullingGroup.StateChanged>(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_enabled(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
UnityEngine.CullingGroup gen_to_be_invoked = (UnityEngine.CullingGroup)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.enabled = LuaAPI.lua_toboolean(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_targetCamera(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
UnityEngine.CullingGroup gen_to_be_invoked = (UnityEngine.CullingGroup)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.targetCamera = (UnityEngine.Camera)translator.GetObject(L, 2, typeof(UnityEngine.Camera));
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|