307 lines
9.8 KiB
C#
307 lines
9.8 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 BFPostEffectRadialBlurWrap
|
|
{
|
|
public static void __Register(RealStatePtr L)
|
|
{
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
System.Type type = typeof(BF.PostEffectRadialBlur);
|
|
Utils.BeginObjectRegister(type, L, translator, 0, 5, 3, 2);
|
|
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetBlurRadius", _m_SetBlurRadius);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefreshBlurRadius", _m_RefreshBlurRadius);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetRadialCenter", _m_SetRadialCenter);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefreshRadialCenter", _m_RefreshRadialCenter);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnRenderImage", _m_OnRenderImage);
|
|
|
|
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "RadialBlurMaterial", _g_get_RadialBlurMaterial);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "BlurRadius", _g_get_BlurRadius);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "RadialCenter", _g_get_RadialCenter);
|
|
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "BlurRadius", _s_set_BlurRadius);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "RadialCenter", _s_set_RadialCenter);
|
|
|
|
|
|
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 BF.PostEffectRadialBlur();
|
|
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 BF.PostEffectRadialBlur constructor!");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetBlurRadius(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.PostEffectRadialBlur gen_to_be_invoked = (BF.PostEffectRadialBlur)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
float _blurRadius = (float)LuaAPI.lua_tonumber(L, 2);
|
|
|
|
gen_to_be_invoked.SetBlurRadius( _blurRadius );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_RefreshBlurRadius(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.PostEffectRadialBlur gen_to_be_invoked = (BF.PostEffectRadialBlur)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.RefreshBlurRadius( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetRadialCenter(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.PostEffectRadialBlur gen_to_be_invoked = (BF.PostEffectRadialBlur)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
UnityEngine.Vector2 _value;translator.Get(L, 2, out _value);
|
|
|
|
gen_to_be_invoked.SetRadialCenter( _value );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_RefreshRadialCenter(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.PostEffectRadialBlur gen_to_be_invoked = (BF.PostEffectRadialBlur)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.RefreshRadialCenter( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_OnRenderImage(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.PostEffectRadialBlur gen_to_be_invoked = (BF.PostEffectRadialBlur)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
BF.PostEffectContext _context = (BF.PostEffectContext)translator.GetObject(L, 2, typeof(BF.PostEffectContext));
|
|
|
|
var gen_ret = gen_to_be_invoked.OnRenderImage( _context );
|
|
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_RadialBlurMaterial(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.PostEffectRadialBlur gen_to_be_invoked = (BF.PostEffectRadialBlur)translator.FastGetCSObj(L, 1);
|
|
translator.Push(L, gen_to_be_invoked.RadialBlurMaterial);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_BlurRadius(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.PostEffectRadialBlur gen_to_be_invoked = (BF.PostEffectRadialBlur)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.BlurRadius);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_RadialCenter(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.PostEffectRadialBlur gen_to_be_invoked = (BF.PostEffectRadialBlur)translator.FastGetCSObj(L, 1);
|
|
translator.PushUnityEngineVector2(L, gen_to_be_invoked.RadialCenter);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_BlurRadius(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.PostEffectRadialBlur gen_to_be_invoked = (BF.PostEffectRadialBlur)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.BlurRadius = (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_RadialCenter(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.PostEffectRadialBlur gen_to_be_invoked = (BF.PostEffectRadialBlur)translator.FastGetCSObj(L, 1);
|
|
UnityEngine.Vector2 gen_value;translator.Get(L, 2, out gen_value);
|
|
gen_to_be_invoked.RadialCenter = gen_value;
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|