355 lines
13 KiB
C#
355 lines
13 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 IronSourceRewardedVideoEventsWrap
|
|
{
|
|
public static void __Register(RealStatePtr L)
|
|
{
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
System.Type type = typeof(IronSourceRewardedVideoEvents);
|
|
Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
null, null, null);
|
|
|
|
Utils.BeginClassRegister(type, L, __CreateInstance, 10, 0, 0);
|
|
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "onAdShowFailedEvent", _e_onAdShowFailedEvent);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "onAdOpenedEvent", _e_onAdOpenedEvent);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "onAdClosedEvent", _e_onAdClosedEvent);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "onAdRewardedEvent", _e_onAdRewardedEvent);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "onAdClickedEvent", _e_onAdClickedEvent);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "onAdAvailableEvent", _e_onAdAvailableEvent);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "onAdUnavailableEvent", _e_onAdUnavailableEvent);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "onAdLoadFailedEvent", _e_onAdLoadFailedEvent);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "onAdReadyEvent", _e_onAdReadyEvent);
|
|
|
|
|
|
|
|
|
|
|
|
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 IronSourceRewardedVideoEvents();
|
|
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 IronSourceRewardedVideoEvents constructor!");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_onAdShowFailedEvent(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
System.Action<IronSourceError, IronSourceAdInfo> gen_delegate = translator.GetDelegate<System.Action<IronSourceError, IronSourceAdInfo>>(L, 2);
|
|
if (gen_delegate == null) {
|
|
return LuaAPI.luaL_error(L, "#2 need System.Action<IronSourceError, IronSourceAdInfo>!");
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "+")) {
|
|
IronSourceRewardedVideoEvents.onAdShowFailedEvent += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "-")) {
|
|
IronSourceRewardedVideoEvents.onAdShowFailedEvent -= gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to IronSourceRewardedVideoEvents.onAdShowFailedEvent!");
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_onAdOpenedEvent(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
System.Action<IronSourceAdInfo> gen_delegate = translator.GetDelegate<System.Action<IronSourceAdInfo>>(L, 2);
|
|
if (gen_delegate == null) {
|
|
return LuaAPI.luaL_error(L, "#2 need System.Action<IronSourceAdInfo>!");
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "+")) {
|
|
IronSourceRewardedVideoEvents.onAdOpenedEvent += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "-")) {
|
|
IronSourceRewardedVideoEvents.onAdOpenedEvent -= gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to IronSourceRewardedVideoEvents.onAdOpenedEvent!");
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_onAdClosedEvent(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
System.Action<IronSourceAdInfo> gen_delegate = translator.GetDelegate<System.Action<IronSourceAdInfo>>(L, 2);
|
|
if (gen_delegate == null) {
|
|
return LuaAPI.luaL_error(L, "#2 need System.Action<IronSourceAdInfo>!");
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "+")) {
|
|
IronSourceRewardedVideoEvents.onAdClosedEvent += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "-")) {
|
|
IronSourceRewardedVideoEvents.onAdClosedEvent -= gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to IronSourceRewardedVideoEvents.onAdClosedEvent!");
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_onAdRewardedEvent(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
System.Action<IronSourcePlacement, IronSourceAdInfo> gen_delegate = translator.GetDelegate<System.Action<IronSourcePlacement, IronSourceAdInfo>>(L, 2);
|
|
if (gen_delegate == null) {
|
|
return LuaAPI.luaL_error(L, "#2 need System.Action<IronSourcePlacement, IronSourceAdInfo>!");
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "+")) {
|
|
IronSourceRewardedVideoEvents.onAdRewardedEvent += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "-")) {
|
|
IronSourceRewardedVideoEvents.onAdRewardedEvent -= gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to IronSourceRewardedVideoEvents.onAdRewardedEvent!");
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_onAdClickedEvent(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
System.Action<IronSourcePlacement, IronSourceAdInfo> gen_delegate = translator.GetDelegate<System.Action<IronSourcePlacement, IronSourceAdInfo>>(L, 2);
|
|
if (gen_delegate == null) {
|
|
return LuaAPI.luaL_error(L, "#2 need System.Action<IronSourcePlacement, IronSourceAdInfo>!");
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "+")) {
|
|
IronSourceRewardedVideoEvents.onAdClickedEvent += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "-")) {
|
|
IronSourceRewardedVideoEvents.onAdClickedEvent -= gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to IronSourceRewardedVideoEvents.onAdClickedEvent!");
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_onAdAvailableEvent(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
System.Action<IronSourceAdInfo> gen_delegate = translator.GetDelegate<System.Action<IronSourceAdInfo>>(L, 2);
|
|
if (gen_delegate == null) {
|
|
return LuaAPI.luaL_error(L, "#2 need System.Action<IronSourceAdInfo>!");
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "+")) {
|
|
IronSourceRewardedVideoEvents.onAdAvailableEvent += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "-")) {
|
|
IronSourceRewardedVideoEvents.onAdAvailableEvent -= gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to IronSourceRewardedVideoEvents.onAdAvailableEvent!");
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_onAdUnavailableEvent(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
System.Action gen_delegate = translator.GetDelegate<System.Action>(L, 2);
|
|
if (gen_delegate == null) {
|
|
return LuaAPI.luaL_error(L, "#2 need System.Action!");
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "+")) {
|
|
IronSourceRewardedVideoEvents.onAdUnavailableEvent += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "-")) {
|
|
IronSourceRewardedVideoEvents.onAdUnavailableEvent -= gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to IronSourceRewardedVideoEvents.onAdUnavailableEvent!");
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_onAdLoadFailedEvent(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
System.Action<IronSourceError> gen_delegate = translator.GetDelegate<System.Action<IronSourceError>>(L, 2);
|
|
if (gen_delegate == null) {
|
|
return LuaAPI.luaL_error(L, "#2 need System.Action<IronSourceError>!");
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "+")) {
|
|
IronSourceRewardedVideoEvents.onAdLoadFailedEvent += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "-")) {
|
|
IronSourceRewardedVideoEvents.onAdLoadFailedEvent -= gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to IronSourceRewardedVideoEvents.onAdLoadFailedEvent!");
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _e_onAdReadyEvent(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
System.Action<IronSourceAdInfo> gen_delegate = translator.GetDelegate<System.Action<IronSourceAdInfo>>(L, 2);
|
|
if (gen_delegate == null) {
|
|
return LuaAPI.luaL_error(L, "#2 need System.Action<IronSourceAdInfo>!");
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "+")) {
|
|
IronSourceRewardedVideoEvents.onAdReadyEvent += gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
|
|
if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "-")) {
|
|
IronSourceRewardedVideoEvents.onAdReadyEvent -= gen_delegate;
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to IronSourceRewardedVideoEvents.onAdReadyEvent!");
|
|
}
|
|
|
|
}
|
|
}
|