static int DestroyPoolObject(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(PoolObject)))
            {
                PoolObject arg0 = (PoolObject)ToLua.ToObject(L, 1);
                GameObjectManager.DestroyPoolObject(arg0);
                return(0);
            }
            else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(PoolObject), typeof(float)))
            {
                PoolObject arg0 = (PoolObject)ToLua.ToObject(L, 1);
                float      arg1 = (float)LuaDLL.lua_tonumber(L, 2);
                GameObjectManager.DestroyPoolObject(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: GameObjectManager.DestroyPoolObject"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
        public void ClearEffect()
        {
            for (int i = 0; i < m_effectList.Count; i++)
            {
                GameObjectManager.DestroyPoolObject(m_effectList[i]);
            }

            m_effectList.Clear();
        }
Exemple #3
0
    void CleanPoemItem()
    {
        for (int i = 0; i < m_itemList.Count; i++)
        {
            GameObjectManager.DestroyPoolObject(m_itemList[i]);
        }

        m_itemList.Clear();
    }
Exemple #4
0
    public static void Clear()
    {
        List <int> keys = new List <int>(effectDic.Keys);

        for (int i = 0; i < keys.Count; i++)
        {
            DestroyEffect(keys[i]);
        }
        for (int j = 0; j < effectList.Count; j++)
        {
            GameObjectManager.DestroyPoolObject(effectList[j]);
        }
        effectList.Clear();
    }
Exemple #5
0
 public static void DestroyEffect(int id)
 {
     if (effectDic.ContainsKey(id))
     {
         PoolObject po = effectDic[id];
         if (po)
         {
             GameObjectManager.DestroyPoolObject(po);
         }
         effectDic.Remove(id);
     }
     else
     {
         Debug.LogError("EffectManager 特效ID未注册! id:" + id);
     }
 }
Exemple #6
0
 static void DelayDestroy(params object[] objs)
 {
     GameObjectManager.DestroyPoolObject((PoolObject)objs[0]);
 }
Exemple #7
0
 public void DestroyThis(params object[] obj)
 {
     GameObjectManager.DestroyPoolObject(this);
 }