Пример #1
0
        public void ReleaseRes(string name)
        {
            if (string.IsNullOrEmpty(name))
            {
                return;
            }

            IRes res = ResMgr.S.GetRes(name, false);

            if (res == null)
            {
                return;
            }

            if (m_WaitLoadList.Remove(res))
            {
                --m_LoadingCount;
                if (m_LoadingCount == 0)
                {
                    m_Listener = null;
                }
            }

            if (m_ResArray.Remove(res))
            {
                res.LoaderUnRegisteListener(OnResLoadFinish);
                res.SubRef();
                ResMgr.S.SetResMapDirty();
            }
        }