Example #1
0
            public void Clear()
            {
                if (refer != null)
                {
                    Refer.DetachDeactive(refer, onDeacive);
                    refer = null;
                }

                type   = null;
                func   = null;
                parent = null;
            }
Example #2
0
        void RemoveLoadItem(LoadItem item_)
        {
            if (item_.referId != null)
            {
                Refer.DetachDeactive(item_.referId, onDeactive);
            }

            item_.Clear();

            m_itemList.Remove(item_);
            m_itemPool.Push(item_);
        }
Example #3
0
        void ReleaseBy(string referId_)
        {
            if (!m_ref2imgHash.ContainsKey(referId_))
            {
                return;
            }

            HashSet <Image> imageHash = m_ref2imgHash[referId_];

            m_ref2imgHash.Remove(referId_);

            Image image;
            var   enumerator = imageHash.GetEnumerator();

            while (enumerator.MoveNext())
            {
                image        = enumerator.Current;
                image.sprite = null;

                m_image2ref.Remove(image);
            }

            if (m_itemQueue.Count > 0)
            {
                string referId = referId_ as string;
                for (int i = m_itemQueue.Count - 1; i >= 0; --i)
                {
                    if (m_itemQueue[i].referId == referId)
                    {
                        RemoveLoadItem(m_itemQueue[i]);     //移除加载项
                    }
                }
            }


            Refer.DetachDeactive(referId_, OnDeactive);
        }
Example #4
0
 static void ClearEvent()
 {
     m_mainLoader.Detach(LOAD_EVT.COMPLETE, onMainLoadEvt);
     Refer.DetachDeactive(onReferDeactive);
 }
Example #5
0
        protected override void ClearEvent()
        {
            base.ClearEvent();

            Refer.DetachDeactive(onReferDeactive);
        }