Beispiel #1
0
    public void DestroyOne(string path, bool OnlyUnUsed = false)
    {
        CoreGameObjectPool pool = m_Pools[path];

        if ((!OnlyUnUsed) || (OnlyUnUsed && pool.NotUsed()))
        {
            GameManager.Instance.m_ABMgr.UnloadAsset(pool.AssetItem);
            pool.Destroy();
            m_Pools.Remove(path);
        }
    }
Beispiel #2
0
        static int _m_Destroy(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                CoreGameObjectPool gen_to_be_invoked = (CoreGameObjectPool)translator.FastGetCSObj(L, 1);



                {
                    gen_to_be_invoked.Destroy(  );



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }