#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 UnityEngineU2DSpriteAtlasManagerWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(UnityEngine.U2D.SpriteAtlasManager); Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(type, L, translator, null, null, null, null, null); Utils.BeginClassRegister(type, L, __CreateInstance, 3, 0, 0); Utils.RegisterFunc(L, Utils.CLS_IDX, "atlasRequested", _e_atlasRequested); Utils.RegisterFunc(L, Utils.CLS_IDX, "atlasRegistered", _e_atlasRegistered); 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 UnityEngine.U2D.SpriteAtlasManager(); 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 UnityEngine.U2D.SpriteAtlasManager constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _e_atlasRequested(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); System.Action> gen_delegate = translator.GetDelegate>>(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, "+")) { UnityEngine.U2D.SpriteAtlasManager.atlasRequested += gen_delegate; return 0; } if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "-")) { UnityEngine.U2D.SpriteAtlasManager.atlasRequested -= 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 UnityEngine.U2D.SpriteAtlasManager.atlasRequested!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _e_atlasRegistered(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); int gen_param_count = LuaAPI.lua_gettop(L); System.Action gen_delegate = translator.GetDelegate>(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, "+")) { UnityEngine.U2D.SpriteAtlasManager.atlasRegistered += gen_delegate; return 0; } if (gen_param_count == 2 && LuaAPI.xlua_is_eq_str(L, 1, "-")) { UnityEngine.U2D.SpriteAtlasManager.atlasRegistered -= 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 UnityEngine.U2D.SpriteAtlasManager.atlasRegistered!"); } } }