191 lines
6.6 KiB
C#
191 lines
6.6 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 TMProCompute_DT_EventArgsWrap
|
|
{
|
|
public static void __Register(RealStatePtr L)
|
|
{
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
System.Type type = typeof(TMPro.Compute_DT_EventArgs);
|
|
Utils.BeginObjectRegister(type, L, translator, 0, 0, 3, 3);
|
|
|
|
|
|
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "EventType", _g_get_EventType);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "ProgressPercentage", _g_get_ProgressPercentage);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "Colors", _g_get_Colors);
|
|
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "EventType", _s_set_EventType);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "ProgressPercentage", _s_set_ProgressPercentage);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "Colors", _s_set_Colors);
|
|
|
|
|
|
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) == 3 && translator.Assignable<TMPro.Compute_DistanceTransform_EventTypes>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
|
|
{
|
|
TMPro.Compute_DistanceTransform_EventTypes _type;translator.Get(L, 2, out _type);
|
|
float _progress = (float)LuaAPI.lua_tonumber(L, 3);
|
|
|
|
var gen_ret = new TMPro.Compute_DT_EventArgs(_type, _progress);
|
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
|
}
|
|
if(LuaAPI.lua_gettop(L) == 3 && translator.Assignable<TMPro.Compute_DistanceTransform_EventTypes>(L, 2) && translator.Assignable<UnityEngine.Color[]>(L, 3))
|
|
{
|
|
TMPro.Compute_DistanceTransform_EventTypes _type;translator.Get(L, 2, out _type);
|
|
UnityEngine.Color[] _colors = (UnityEngine.Color[])translator.GetObject(L, 3, typeof(UnityEngine.Color[]));
|
|
|
|
var gen_ret = new TMPro.Compute_DT_EventArgs(_type, _colors);
|
|
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 TMPro.Compute_DT_EventArgs constructor!");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_EventType(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
TMPro.Compute_DT_EventArgs gen_to_be_invoked = (TMPro.Compute_DT_EventArgs)translator.FastGetCSObj(L, 1);
|
|
translator.Push(L, gen_to_be_invoked.EventType);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_ProgressPercentage(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
TMPro.Compute_DT_EventArgs gen_to_be_invoked = (TMPro.Compute_DT_EventArgs)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.ProgressPercentage);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_Colors(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
TMPro.Compute_DT_EventArgs gen_to_be_invoked = (TMPro.Compute_DT_EventArgs)translator.FastGetCSObj(L, 1);
|
|
translator.Push(L, gen_to_be_invoked.Colors);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_EventType(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
TMPro.Compute_DT_EventArgs gen_to_be_invoked = (TMPro.Compute_DT_EventArgs)translator.FastGetCSObj(L, 1);
|
|
TMPro.Compute_DistanceTransform_EventTypes gen_value;translator.Get(L, 2, out gen_value);
|
|
gen_to_be_invoked.EventType = 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_ProgressPercentage(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
TMPro.Compute_DT_EventArgs gen_to_be_invoked = (TMPro.Compute_DT_EventArgs)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.ProgressPercentage = (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_Colors(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
TMPro.Compute_DT_EventArgs gen_to_be_invoked = (TMPro.Compute_DT_EventArgs)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.Colors = (UnityEngine.Color[])translator.GetObject(L, 2, typeof(UnityEngine.Color[]));
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|