Files
Main/Assets/GameAssets/Resources/GameUI/XLua/Gen/UIRect_AnchorPointWrap.cs
2025-01-25 04:38:09 +08:00

435 lines
16 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 UIRectAnchorPointWrap
{
public static void __Register(RealStatePtr L)
{
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
System.Type type = typeof(UIRect.AnchorPoint);
Utils.BeginObjectRegister(type, L, translator, 0, 5, 5, 5);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Set", _m_Set);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetToNearest", _m_SetToNearest);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetHorizontal", _m_SetHorizontal);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetVertical", _m_SetVertical);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetSides", _m_GetSides);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "target", _g_get_target);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "relative", _g_get_relative);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "absolute", _g_get_absolute);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "rect", _g_get_rect);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "targetCam", _g_get_targetCam);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "target", _s_set_target);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "relative", _s_set_relative);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "absolute", _s_set_absolute);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "rect", _s_set_rect);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "targetCam", _s_set_targetCam);
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 {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
if(LuaAPI.lua_gettop(L) == 1)
{
UIRect.AnchorPoint gen_ret = new UIRect.AnchorPoint();
translator.Push(L, gen_ret);
return 1;
}
if(LuaAPI.lua_gettop(L) == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
{
float _relative = (float)LuaAPI.lua_tonumber(L, 2);
UIRect.AnchorPoint gen_ret = new UIRect.AnchorPoint(_relative);
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 UIRect.AnchorPoint constructor!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_Set(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UIRect.AnchorPoint gen_to_be_invoked = (UIRect.AnchorPoint)translator.FastGetCSObj(L, 1);
int gen_param_count = LuaAPI.lua_gettop(L);
if(gen_param_count == 3&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
{
float _relative = (float)LuaAPI.lua_tonumber(L, 2);
float _absolute = (float)LuaAPI.lua_tonumber(L, 3);
gen_to_be_invoked.Set( _relative, _absolute );
return 0;
}
if(gen_param_count == 4&& translator.Assignable<UnityEngine.Transform>(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4))
{
UnityEngine.Transform _target = (UnityEngine.Transform)translator.GetObject(L, 2, typeof(UnityEngine.Transform));
float _relative = (float)LuaAPI.lua_tonumber(L, 3);
float _absolute = (float)LuaAPI.lua_tonumber(L, 4);
gen_to_be_invoked.Set( _target, _relative, _absolute );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return LuaAPI.luaL_error(L, "invalid arguments to UIRect.AnchorPoint.Set!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_SetToNearest(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UIRect.AnchorPoint gen_to_be_invoked = (UIRect.AnchorPoint)translator.FastGetCSObj(L, 1);
int gen_param_count = LuaAPI.lua_gettop(L);
if(gen_param_count == 4&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4))
{
float _abs0 = (float)LuaAPI.lua_tonumber(L, 2);
float _abs1 = (float)LuaAPI.lua_tonumber(L, 3);
float _abs2 = (float)LuaAPI.lua_tonumber(L, 4);
gen_to_be_invoked.SetToNearest( _abs0, _abs1, _abs2 );
return 0;
}
if(gen_param_count == 7&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 6)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 7))
{
float _rel0 = (float)LuaAPI.lua_tonumber(L, 2);
float _rel1 = (float)LuaAPI.lua_tonumber(L, 3);
float _rel2 = (float)LuaAPI.lua_tonumber(L, 4);
float _abs0 = (float)LuaAPI.lua_tonumber(L, 5);
float _abs1 = (float)LuaAPI.lua_tonumber(L, 6);
float _abs2 = (float)LuaAPI.lua_tonumber(L, 7);
gen_to_be_invoked.SetToNearest( _rel0, _rel1, _rel2, _abs0, _abs1, _abs2 );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return LuaAPI.luaL_error(L, "invalid arguments to UIRect.AnchorPoint.SetToNearest!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_SetHorizontal(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UIRect.AnchorPoint gen_to_be_invoked = (UIRect.AnchorPoint)translator.FastGetCSObj(L, 1);
{
UnityEngine.Transform _parent = (UnityEngine.Transform)translator.GetObject(L, 2, typeof(UnityEngine.Transform));
float _localPos = (float)LuaAPI.lua_tonumber(L, 3);
gen_to_be_invoked.SetHorizontal( _parent, _localPos );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_SetVertical(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UIRect.AnchorPoint gen_to_be_invoked = (UIRect.AnchorPoint)translator.FastGetCSObj(L, 1);
{
UnityEngine.Transform _parent = (UnityEngine.Transform)translator.GetObject(L, 2, typeof(UnityEngine.Transform));
float _localPos = (float)LuaAPI.lua_tonumber(L, 3);
gen_to_be_invoked.SetVertical( _parent, _localPos );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_GetSides(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UIRect.AnchorPoint gen_to_be_invoked = (UIRect.AnchorPoint)translator.FastGetCSObj(L, 1);
{
UnityEngine.Transform _relativeTo = (UnityEngine.Transform)translator.GetObject(L, 2, typeof(UnityEngine.Transform));
UnityEngine.Vector3[] gen_ret = gen_to_be_invoked.GetSides( _relativeTo );
translator.Push(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_target(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UIRect.AnchorPoint gen_to_be_invoked = (UIRect.AnchorPoint)translator.FastGetCSObj(L, 1);
translator.Push(L, gen_to_be_invoked.target);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_relative(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UIRect.AnchorPoint gen_to_be_invoked = (UIRect.AnchorPoint)translator.FastGetCSObj(L, 1);
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.relative);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_absolute(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UIRect.AnchorPoint gen_to_be_invoked = (UIRect.AnchorPoint)translator.FastGetCSObj(L, 1);
LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.absolute);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_rect(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UIRect.AnchorPoint gen_to_be_invoked = (UIRect.AnchorPoint)translator.FastGetCSObj(L, 1);
translator.Push(L, gen_to_be_invoked.rect);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_targetCam(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UIRect.AnchorPoint gen_to_be_invoked = (UIRect.AnchorPoint)translator.FastGetCSObj(L, 1);
translator.Push(L, gen_to_be_invoked.targetCam);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_target(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UIRect.AnchorPoint gen_to_be_invoked = (UIRect.AnchorPoint)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.target = (UnityEngine.Transform)translator.GetObject(L, 2, typeof(UnityEngine.Transform));
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_relative(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UIRect.AnchorPoint gen_to_be_invoked = (UIRect.AnchorPoint)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.relative = (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_absolute(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UIRect.AnchorPoint gen_to_be_invoked = (UIRect.AnchorPoint)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.absolute = 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_rect(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UIRect.AnchorPoint gen_to_be_invoked = (UIRect.AnchorPoint)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.rect = (UIRect)translator.GetObject(L, 2, typeof(UIRect));
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_targetCam(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UIRect.AnchorPoint gen_to_be_invoked = (UIRect.AnchorPoint)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.targetCam = (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;
}
}
}