313 lines
10 KiB
C#
313 lines
10 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 IUnityLevelPlayRewardedVideoWrap
|
|
{
|
|
public static void __Register(RealStatePtr L)
|
|
{
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
System.Type type = typeof(IUnityLevelPlayRewardedVideo);
|
|
Utils.BeginObjectRegister(type, L, translator, 0, 7, 0, 0);
|
|
|
|
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnAdShowFailed", _e_OnAdShowFailed);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnAdOpened", _e_OnAdOpened);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnAdClosed", _e_OnAdClosed);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnAdRewarded", _e_OnAdRewarded);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnAdClicked", _e_OnAdClicked);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnAdAvailable", _e_OnAdAvailable);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnAdUnavailable", _e_OnAdUnavailable);
|
|
|
|
|
|
|
|
|
|
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, "IUnityLevelPlayRewardedVideo does not have a constructor!");
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_OnAdShowFailed(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
IUnityLevelPlayRewardedVideo gen_to_be_invoked = (IUnityLevelPlayRewardedVideo)translator.FastGetCSObj(L, 1);
|
|
System.Action<IronSourceError, IronSourceAdInfo> gen_delegate = translator.GetDelegate<System.Action<IronSourceError, IronSourceAdInfo>>(L, 3);
|
|
if (gen_delegate == null) {
|
|
return LuaAPI.luaL_error(L, "#3 need System.Action<IronSourceError, IronSourceAdInfo>!");
|
|
}
|
|
|
|
if (gen_param_count == 3)
|
|
{
|
|
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
|
|
gen_to_be_invoked.OnAdShowFailed += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
|
|
gen_to_be_invoked.OnAdShowFailed -= 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 IUnityLevelPlayRewardedVideo.OnAdShowFailed!");
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_OnAdOpened(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
IUnityLevelPlayRewardedVideo gen_to_be_invoked = (IUnityLevelPlayRewardedVideo)translator.FastGetCSObj(L, 1);
|
|
System.Action<IronSourceAdInfo> gen_delegate = translator.GetDelegate<System.Action<IronSourceAdInfo>>(L, 3);
|
|
if (gen_delegate == null) {
|
|
return LuaAPI.luaL_error(L, "#3 need System.Action<IronSourceAdInfo>!");
|
|
}
|
|
|
|
if (gen_param_count == 3)
|
|
{
|
|
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
|
|
gen_to_be_invoked.OnAdOpened += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
|
|
gen_to_be_invoked.OnAdOpened -= 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 IUnityLevelPlayRewardedVideo.OnAdOpened!");
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_OnAdClosed(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
IUnityLevelPlayRewardedVideo gen_to_be_invoked = (IUnityLevelPlayRewardedVideo)translator.FastGetCSObj(L, 1);
|
|
System.Action<IronSourceAdInfo> gen_delegate = translator.GetDelegate<System.Action<IronSourceAdInfo>>(L, 3);
|
|
if (gen_delegate == null) {
|
|
return LuaAPI.luaL_error(L, "#3 need System.Action<IronSourceAdInfo>!");
|
|
}
|
|
|
|
if (gen_param_count == 3)
|
|
{
|
|
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
|
|
gen_to_be_invoked.OnAdClosed += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
|
|
gen_to_be_invoked.OnAdClosed -= 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 IUnityLevelPlayRewardedVideo.OnAdClosed!");
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_OnAdRewarded(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
IUnityLevelPlayRewardedVideo gen_to_be_invoked = (IUnityLevelPlayRewardedVideo)translator.FastGetCSObj(L, 1);
|
|
System.Action<IronSourcePlacement, IronSourceAdInfo> gen_delegate = translator.GetDelegate<System.Action<IronSourcePlacement, IronSourceAdInfo>>(L, 3);
|
|
if (gen_delegate == null) {
|
|
return LuaAPI.luaL_error(L, "#3 need System.Action<IronSourcePlacement, IronSourceAdInfo>!");
|
|
}
|
|
|
|
if (gen_param_count == 3)
|
|
{
|
|
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
|
|
gen_to_be_invoked.OnAdRewarded += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
|
|
gen_to_be_invoked.OnAdRewarded -= 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 IUnityLevelPlayRewardedVideo.OnAdRewarded!");
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_OnAdClicked(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
IUnityLevelPlayRewardedVideo gen_to_be_invoked = (IUnityLevelPlayRewardedVideo)translator.FastGetCSObj(L, 1);
|
|
System.Action<IronSourcePlacement, IronSourceAdInfo> gen_delegate = translator.GetDelegate<System.Action<IronSourcePlacement, IronSourceAdInfo>>(L, 3);
|
|
if (gen_delegate == null) {
|
|
return LuaAPI.luaL_error(L, "#3 need System.Action<IronSourcePlacement, IronSourceAdInfo>!");
|
|
}
|
|
|
|
if (gen_param_count == 3)
|
|
{
|
|
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
|
|
gen_to_be_invoked.OnAdClicked += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
|
|
gen_to_be_invoked.OnAdClicked -= 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 IUnityLevelPlayRewardedVideo.OnAdClicked!");
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_OnAdAvailable(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
IUnityLevelPlayRewardedVideo gen_to_be_invoked = (IUnityLevelPlayRewardedVideo)translator.FastGetCSObj(L, 1);
|
|
System.Action<IronSourceAdInfo> gen_delegate = translator.GetDelegate<System.Action<IronSourceAdInfo>>(L, 3);
|
|
if (gen_delegate == null) {
|
|
return LuaAPI.luaL_error(L, "#3 need System.Action<IronSourceAdInfo>!");
|
|
}
|
|
|
|
if (gen_param_count == 3)
|
|
{
|
|
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "+")) {
|
|
gen_to_be_invoked.OnAdAvailable += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
|
|
gen_to_be_invoked.OnAdAvailable -= 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 IUnityLevelPlayRewardedVideo.OnAdAvailable!");
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_OnAdUnavailable(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
IUnityLevelPlayRewardedVideo gen_to_be_invoked = (IUnityLevelPlayRewardedVideo)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.OnAdUnavailable += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (LuaAPI.xlua_is_eq_str(L, 2, "-")) {
|
|
gen_to_be_invoked.OnAdUnavailable -= 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 IUnityLevelPlayRewardedVideo.OnAdUnavailable!");
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|