Esempio n. 1
0
 static int GetObjectPooltManager(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 0);
         LuaFramework.ObjectPoolManager o = LuaFramework.LuaHelper.GetObjectPooltManager();
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int OnInit(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         LuaFramework.ObjectPoolManager obj = (LuaFramework.ObjectPoolManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.ObjectPoolManager));
         obj.OnInit();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Esempio n. 3
0
 static int RemovePool(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         LuaFramework.ObjectPoolManager obj = (LuaFramework.ObjectPoolManager)ToLua.CheckObject <LuaFramework.ObjectPoolManager>(L, 1);
         string arg0 = ToLua.CheckString(L, 2);
         obj.RemovePool(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Esempio n. 4
0
 static int Get(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         LuaFramework.ObjectPoolManager obj = (LuaFramework.ObjectPoolManager)ToLua.CheckObject <LuaFramework.ObjectPoolManager>(L, 1);
         string arg0 = ToLua.CheckString(L, 2);
         UnityEngine.GameObject o = obj.Get(arg0);
         ToLua.PushSealed(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Esempio n. 5
0
 static int PoolExist(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         LuaFramework.ObjectPoolManager obj = (LuaFramework.ObjectPoolManager)ToLua.CheckObject <LuaFramework.ObjectPoolManager>(L, 1);
         string arg0 = ToLua.CheckString(L, 2);
         bool   o    = obj.PoolExist(arg0);
         LuaDLL.lua_pushboolean(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Esempio n. 6
0
 static int Release(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         LuaFramework.ObjectPoolManager obj = (LuaFramework.ObjectPoolManager)ToLua.CheckObject <LuaFramework.ObjectPoolManager>(L, 1);
         string arg0 = ToLua.CheckString(L, 2);
         UnityEngine.GameObject arg1 = (UnityEngine.GameObject)ToLua.CheckObject(L, 3, typeof(UnityEngine.GameObject));
         obj.Release(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int GetPool(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         LuaFramework.ObjectPoolManager obj = (LuaFramework.ObjectPoolManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.ObjectPoolManager));
         string arg0 = ToLua.CheckString(L, 2);
         LuaFramework.GameObjectPool o = obj.GetPool(arg0);
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Esempio n. 8
0
 static int GetPoolObjNum(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         LuaFramework.ObjectPoolManager obj = (LuaFramework.ObjectPoolManager)ToLua.CheckObject <LuaFramework.ObjectPoolManager>(L, 1);
         string arg0 = ToLua.CheckString(L, 2);
         int    o    = obj.GetPoolObjNum(arg0);
         LuaDLL.lua_pushinteger(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Esempio n. 9
0
 static int CreatePool(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 5);
         LuaFramework.ObjectPoolManager obj = (LuaFramework.ObjectPoolManager)ToLua.CheckObject <LuaFramework.ObjectPoolManager>(L, 1);
         string arg0 = ToLua.CheckString(L, 2);
         int    arg1 = (int)LuaDLL.luaL_checknumber(L, 3);
         int    arg2 = (int)LuaDLL.luaL_checknumber(L, 4);
         UnityEngine.GameObject      arg3 = (UnityEngine.GameObject)ToLua.CheckObject(L, 5, typeof(UnityEngine.GameObject));
         LuaFramework.GameObjectPool o    = obj.CreatePool(arg0, arg1, arg2, arg3);
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }