c1_unity/Assets/XLua/Gen/IUnityRewardedVideoManualWrap.cs
2025-11-03 15:00:43 +08:00

138 lines
3.9 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 IUnityRewardedVideoManualWrap
{
public static void __Register(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
System.Type type = typeof(IUnityRewardedVideoManual);
Utils.BeginObjectRegister(type, L, translator, 0, 2, 0, 0);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnRewardedVideoAdReady", _e_OnRewardedVideoAdReady);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnRewardedVideoAdLoadFailed", _e_OnRewardedVideoAdLoadFailed);
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)
{
return LuaAPI.luaL_error(L, "IUnityRewardedVideoManual does not have a constructor!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _e_OnRewardedVideoAdReady(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
int gen_param_count = LuaAPI.lua_gettop(L);
IUnityRewardedVideoManual gen_to_be_invoked = (IUnityRewardedVideoManual)translator.FastGetCSObj(L, 1);
System.Action gen_delegate = translator.GetDelegate<System.Action>(L, 3);
if (gen_delegate == null) {
return LuaAPI.luaL_error(L, "#3 need System.Action!");
}
if (gen_param_count == 3)
{
if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
gen_to_be_invoked.OnRewardedVideoAdReady += gen_delegate;
return 0;
}
if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
gen_to_be_invoked.OnRewardedVideoAdReady -= gen_delegate;
return 0;
}
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
LuaAPI.luaL_error(L, "invalid arguments to IUnityRewardedVideoManual.OnRewardedVideoAdReady!");
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _e_OnRewardedVideoAdLoadFailed(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
int gen_param_count = LuaAPI.lua_gettop(L);
IUnityRewardedVideoManual gen_to_be_invoked = (IUnityRewardedVideoManual)translator.FastGetCSObj(L, 1);
System.Action<IronSourceError> gen_delegate = translator.GetDelegate<System.Action<IronSourceError>>(L, 3);
if (gen_delegate == null) {
return LuaAPI.luaL_error(L, "#3 need System.Action<IronSourceError>!");
}
if (gen_param_count == 3)
{
if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
gen_to_be_invoked.OnRewardedVideoAdLoadFailed += gen_delegate;
return 0;
}
if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
gen_to_be_invoked.OnRewardedVideoAdLoadFailed -= gen_delegate;
return 0;
}
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
LuaAPI.luaL_error(L, "invalid arguments to IUnityRewardedVideoManual.OnRewardedVideoAdLoadFailed!");
return 0;
}
}
}