Ejemplo n.º 1
0
        /// <summary>
        /// 回收掉落物品
        /// </summary>
        /// <param name="unusedDropItem"></param>
        private void ReleaseDropItem(DropItemInfo unusedDropItem)
        {
            EventToUI.SetArg(UIEventArg.Arg1, unusedDropItem.dropItemObj);
            EventToUI.SendEvent("EU_REMOVE_DROPITEMTEXT");

            GameObjectPool objPool = m_moneyEftObjectPool;

            if (unusedDropItem.dropType == DROP_TYPE.DROPTYPE_COMMON)
            {
                objPool = m_itemEftPoolDict[unusedDropItem.dropEft];
            }

            if (null != unusedDropItem.dropQualityEftObj)
            {
                CoreEntry.gGameObjPoolMgr.Destroy(unusedDropItem.dropQualityEftObj);
            }

            if (unusedDropItem.dropItemObj != null)
            {
                objPool.RecyclePrefabInstance(unusedDropItem.dropItemObj);
                unusedDropItem.dropItemObj = null;
            }
            m_UnusedDropItemList.Add(unusedDropItem);
        }