public void Reset() { m_resourceObjDealFinished = null; m_gameObjDealFinished = null; m_param1 = m_param2 = m_param3 = null; m_gameObjectItem = null; }
public void AsyncLoadGameObjectItem(string path, GameObjectItem gameObjectItem, OnAsyncGameObjFinished dealFinished, LoadAssetPriority priority) { ResourceItem item = GetAssetFromAssetCache(gameObjectItem.Crc); if (item != null) { gameObjectItem.ResourceItem = item; if (dealFinished != null) { dealFinished(path, gameObjectItem); } return; } //判断是否在加载中 AsyncLoadAssetParam para = null; if (!m_loadingAssetDict.TryGetValue(gameObjectItem.Crc, out para) || para == null) { para = m_asyncLoadAssetParamPool.Spawn(true); para.m_crc = gameObjectItem.Crc; para.m_path = path; para.m_priority = priority; m_loadingAssetDict.Add(gameObjectItem.Crc, para); m_loadingAssetList[(int)priority].Add(para); } AsyncCallBack callback = m_asyncCallBackPool.Spawn(true); callback.m_gameObjDealFinished = dealFinished; callback.m_gameObjectItem = gameObjectItem; para.m_callbackList.Add(callback); }