#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 IUnityBannerWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(IUnityBanner); Utils.BeginObjectRegister(type, L, translator, 0, 6, 0, 0); Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnBannerAdLoaded", _e_OnBannerAdLoaded); Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnBannerAdLeftApplication", _e_OnBannerAdLeftApplication); Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnBannerAdScreenDismissed", _e_OnBannerAdScreenDismissed); Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnBannerAdScreenPresented", _e_OnBannerAdScreenPresented); Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnBannerAdClicked", _e_OnBannerAdClicked); Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnBannerAdLoadFailed", _e_OnBannerAdLoadFailed); 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, "IUnityBanner does not have a constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _e_OnBannerAdLoaded(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); IUnityBanner gen_to_be_invoked = (IUnityBanner)translator.FastGetCSObj(L, 1); System.Action gen_delegate = translator.GetDelegate(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.OnBannerAdLoaded += gen_delegate; return 0; } if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { gen_to_be_invoked.OnBannerAdLoaded -= 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 IUnityBanner.OnBannerAdLoaded!"); return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _e_OnBannerAdLeftApplication(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); IUnityBanner gen_to_be_invoked = (IUnityBanner)translator.FastGetCSObj(L, 1); System.Action gen_delegate = translator.GetDelegate(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.OnBannerAdLeftApplication += gen_delegate; return 0; } if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { gen_to_be_invoked.OnBannerAdLeftApplication -= 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 IUnityBanner.OnBannerAdLeftApplication!"); return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _e_OnBannerAdScreenDismissed(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); IUnityBanner gen_to_be_invoked = (IUnityBanner)translator.FastGetCSObj(L, 1); System.Action gen_delegate = translator.GetDelegate(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.OnBannerAdScreenDismissed += gen_delegate; return 0; } if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { gen_to_be_invoked.OnBannerAdScreenDismissed -= 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 IUnityBanner.OnBannerAdScreenDismissed!"); return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _e_OnBannerAdScreenPresented(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); IUnityBanner gen_to_be_invoked = (IUnityBanner)translator.FastGetCSObj(L, 1); System.Action gen_delegate = translator.GetDelegate(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.OnBannerAdScreenPresented += gen_delegate; return 0; } if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { gen_to_be_invoked.OnBannerAdScreenPresented -= 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 IUnityBanner.OnBannerAdScreenPresented!"); return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _e_OnBannerAdClicked(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); IUnityBanner gen_to_be_invoked = (IUnityBanner)translator.FastGetCSObj(L, 1); System.Action gen_delegate = translator.GetDelegate(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.OnBannerAdClicked += gen_delegate; return 0; } if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { gen_to_be_invoked.OnBannerAdClicked -= 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 IUnityBanner.OnBannerAdClicked!"); return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _e_OnBannerAdLoadFailed(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); IUnityBanner gen_to_be_invoked = (IUnityBanner)translator.FastGetCSObj(L, 1); System.Action gen_delegate = translator.GetDelegate>(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.OnBannerAdLoadFailed += gen_delegate; return 0; } if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { gen_to_be_invoked.OnBannerAdLoadFailed -= 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 IUnityBanner.OnBannerAdLoadFailed!"); return 0; } } }