#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 GameObjectPoolManagerWrap
|
{
|
public static void __Register(RealStatePtr L)
|
{
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
System.Type type = typeof(GameObjectPoolManager);
|
Utils.BeginObjectRegister(type, L, translator, 0, 19, 0, 0);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Initialize", _m_Initialize);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddDontDestroyGoInstID", _m_AddDontDestroyGoInstID);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ExistPool", _m_ExistPool);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RequestPool", _m_RequestPool);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "CacheGameObject", _m_CacheGameObject);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "CacheNpc", _m_CacheNpc);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RequestGameObject", _m_RequestGameObject);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RequestDefaultPet", _m_RequestDefaultPet);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RequestDefaultFightNpc", _m_RequestDefaultFightNpc);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RequestDefaultFuncNpc", _m_RequestDefaultFuncNpc);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ReleaseDefaultPet", _m_ReleaseDefaultPet);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ReleaseDefaultHorse", _m_ReleaseDefaultHorse);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ReleaseDefaultFightNPC", _m_ReleaseDefaultFightNPC);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ReleaseDefaultFuncNPC", _m_ReleaseDefaultFuncNPC);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RequestNpcGameObject", _m_RequestNpcGameObject);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ReleaseGameObject", _m_ReleaseGameObject);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Release", _m_Release);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnLoadNPC", _m_UnLoadNPC);
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnLoadAll", _m_UnLoadAll);
|
|
|
|
|
|
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 {
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
if(LuaAPI.lua_gettop(L) == 1)
|
{
|
|
GameObjectPoolManager gen_ret = new GameObjectPoolManager();
|
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 GameObjectPoolManager constructor!");
|
|
}
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_Initialize(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
GameObjectPoolManager gen_to_be_invoked = (GameObjectPoolManager)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_AddDontDestroyGoInstID(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
GameObjectPoolManager gen_to_be_invoked = (GameObjectPoolManager)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
int _id = LuaAPI.xlua_tointeger(L, 2);
|
|
gen_to_be_invoked.AddDontDestroyGoInstID( _id );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_ExistPool(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
GameObjectPoolManager gen_to_be_invoked = (GameObjectPoolManager)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
UnityEngine.GameObject _prefab = (UnityEngine.GameObject)translator.GetObject(L, 2, typeof(UnityEngine.GameObject));
|
|
bool gen_ret = gen_to_be_invoked.ExistPool( _prefab );
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
|
|
return 1;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_RequestPool(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
GameObjectPoolManager gen_to_be_invoked = (GameObjectPoolManager)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
UnityEngine.GameObject _prefab = (UnityEngine.GameObject)translator.GetObject(L, 2, typeof(UnityEngine.GameObject));
|
|
GameObjectPoolManager.GameObjectPool gen_ret = gen_to_be_invoked.RequestPool( _prefab );
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_CacheGameObject(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
GameObjectPoolManager gen_to_be_invoked = (GameObjectPoolManager)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
UnityEngine.GameObject _prefab = (UnityEngine.GameObject)translator.GetObject(L, 2, typeof(UnityEngine.GameObject));
|
int _count = LuaAPI.xlua_tointeger(L, 3);
|
bool __prefabActive = LuaAPI.lua_toboolean(L, 4);
|
|
gen_to_be_invoked.CacheGameObject( _prefab, _count, __prefabActive );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_CacheNpc(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
GameObjectPoolManager gen_to_be_invoked = (GameObjectPoolManager)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
int _npcID = LuaAPI.xlua_tointeger(L, 2);
|
int _count = LuaAPI.xlua_tointeger(L, 3);
|
bool _prefabActive = LuaAPI.lua_toboolean(L, 4);
|
|
gen_to_be_invoked.CacheNpc( _npcID, _count, _prefabActive );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_RequestGameObject(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
GameObjectPoolManager gen_to_be_invoked = (GameObjectPoolManager)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
UnityEngine.GameObject _prefab = (UnityEngine.GameObject)translator.GetObject(L, 2, typeof(UnityEngine.GameObject));
|
|
UnityEngine.GameObject gen_ret = gen_to_be_invoked.RequestGameObject( _prefab );
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_RequestDefaultPet(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
GameObjectPoolManager gen_to_be_invoked = (GameObjectPoolManager)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
UnityEngine.GameObject gen_ret = gen_to_be_invoked.RequestDefaultPet( );
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_RequestDefaultFightNpc(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
GameObjectPoolManager gen_to_be_invoked = (GameObjectPoolManager)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
UnityEngine.GameObject gen_ret = gen_to_be_invoked.RequestDefaultFightNpc( );
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_RequestDefaultFuncNpc(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
GameObjectPoolManager gen_to_be_invoked = (GameObjectPoolManager)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
|
UnityEngine.GameObject gen_ret = gen_to_be_invoked.RequestDefaultFuncNpc( );
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_ReleaseDefaultPet(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
GameObjectPoolManager gen_to_be_invoked = (GameObjectPoolManager)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 2, typeof(UnityEngine.GameObject));
|
|
gen_to_be_invoked.ReleaseDefaultPet( _go );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_ReleaseDefaultHorse(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
GameObjectPoolManager gen_to_be_invoked = (GameObjectPoolManager)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 2, typeof(UnityEngine.GameObject));
|
|
gen_to_be_invoked.ReleaseDefaultHorse( _go );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_ReleaseDefaultFightNPC(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
GameObjectPoolManager gen_to_be_invoked = (GameObjectPoolManager)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 2, typeof(UnityEngine.GameObject));
|
|
gen_to_be_invoked.ReleaseDefaultFightNPC( _go );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_ReleaseDefaultFuncNPC(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
GameObjectPoolManager gen_to_be_invoked = (GameObjectPoolManager)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 2, typeof(UnityEngine.GameObject));
|
|
gen_to_be_invoked.ReleaseDefaultFuncNPC( _go );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_RequestNpcGameObject(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
GameObjectPoolManager gen_to_be_invoked = (GameObjectPoolManager)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
int _npcID = LuaAPI.xlua_tointeger(L, 2);
|
|
UnityEngine.GameObject gen_ret = gen_to_be_invoked.RequestNpcGameObject( _npcID );
|
translator.Push(L, gen_ret);
|
|
|
|
return 1;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_ReleaseGameObject(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
GameObjectPoolManager gen_to_be_invoked = (GameObjectPoolManager)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
UnityEngine.GameObject _prefab = (UnityEngine.GameObject)translator.GetObject(L, 2, typeof(UnityEngine.GameObject));
|
UnityEngine.GameObject _go = (UnityEngine.GameObject)translator.GetObject(L, 3, typeof(UnityEngine.GameObject));
|
|
gen_to_be_invoked.ReleaseGameObject( _prefab, _go );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_Release(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
GameObjectPoolManager gen_to_be_invoked = (GameObjectPoolManager)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
UnityEngine.GameObject _prefab = (UnityEngine.GameObject)translator.GetObject(L, 2, typeof(UnityEngine.GameObject));
|
|
gen_to_be_invoked.Release( _prefab );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_UnLoadNPC(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
GameObjectPoolManager gen_to_be_invoked = (GameObjectPoolManager)translator.FastGetCSObj(L, 1);
|
|
|
|
{
|
int _npcID = LuaAPI.xlua_tointeger(L, 2);
|
|
gen_to_be_invoked.UnLoadNPC( _npcID );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
}
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
static int _m_UnLoadAll(RealStatePtr L)
|
{
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
GameObjectPoolManager gen_to_be_invoked = (GameObjectPoolManager)translator.FastGetCSObj(L, 1);
|
|
|
int gen_param_count = LuaAPI.lua_gettop(L);
|
|
if(gen_param_count == 2&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 2))
|
{
|
bool _force = LuaAPI.lua_toboolean(L, 2);
|
|
gen_to_be_invoked.UnLoadAll( _force );
|
|
|
|
return 0;
|
}
|
if(gen_param_count == 1)
|
{
|
|
gen_to_be_invoked.UnLoadAll( );
|
|
|
|
return 0;
|
}
|
|
} catch(System.Exception gen_e) {
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
}
|
|
return LuaAPI.luaL_error(L, "invalid arguments to GameObjectPoolManager.UnLoadAll!");
|
|
}
|
|
|
|
|
|
|
|
|
|
|
}
|
}
|