#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 CacheSceneSystemWrap { public static void __Register(RealStatePtr L) { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(CacheSceneSystem); Utils.BeginObjectRegister(type, L, translator, 0, 3, 0, 0); Utils.RegisterFunc(L, Utils.METHOD_IDX, "Initialize", _m_Initialize); Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnInitialize", _m_UnInitialize); Utils.RegisterFunc(L, Utils.METHOD_IDX, "PreLoadSceneForCache", _m_PreLoadSceneForCache); 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) { try { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); if(LuaAPI.lua_gettop(L) == 1) { CacheSceneSystem gen_ret = new CacheSceneSystem(); 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 CacheSceneSystem constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_Initialize(RealStatePtr L) { try { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); CacheSceneSystem gen_to_be_invoked = (CacheSceneSystem)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.Initialize( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_UnInitialize(RealStatePtr L) { try { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); CacheSceneSystem gen_to_be_invoked = (CacheSceneSystem)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.UnInitialize( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_PreLoadSceneForCache(RealStatePtr L) { try { ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L); CacheSceneSystem gen_to_be_invoked = (CacheSceneSystem)translator.FastGetCSObj(L, 1); int gen_param_count = LuaAPI.lua_gettop(L); if(gen_param_count == 3&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)&& translator.Assignable>(L, 3)) { string _sceneName = LuaAPI.lua_tostring(L, 2); Thousandto.Core.Base.MyAction _action = translator.GetDelegate>(L, 3); gen_to_be_invoked.PreLoadSceneForCache( _sceneName, _action ); return 0; } if(gen_param_count == 2&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) { string _sceneName = LuaAPI.lua_tostring(L, 2); gen_to_be_invoked.PreLoadSceneForCache( _sceneName ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return LuaAPI.luaL_error(L, "invalid arguments to CacheSceneSystem.PreLoadSceneForCache!"); } } }