示例#1
0
        public override void Dispose()
        {
            base.Dispose();

            ObjectPoolBase tmpObjPool = GetPoolByType(Parent.UnitType);

            if (null != tmpObjPool)
            {
                tmpObjPool.Unspawn(mHudInfo);
            }

            mHudInfo = null;
        }
示例#2
0
        public override void Dispose()
        {
            base.Dispose();

            for (int i = mHudPopupList.Count - 1; i >= 0; --i)
            {
                var            tmpHudPopup = mHudPopupList[i];
                ObjectPoolBase tmpPool     = GetPoolByType(tmpHudPopup.PopupType);

                if (null != tmpPool)
                {
                    tmpPool.Unspawn(tmpHudPopup);
                }
            }

            mHudPopupList.Clear();
        }
示例#3
0
        public override void Update(float deltaTime)
        {
            base.Update(deltaTime);

            for (int i = mHudPopupList.Count - 1; i >= 0; --i)
            {
                var tmpHudPopup = mHudPopupList[i];
                tmpHudPopup.Update(deltaTime);

                if (tmpHudPopup.IsInvalid)
                {
                    ObjectPoolBase tmpPool = GetPoolByType(tmpHudPopup.PopupType);

                    if (null != tmpPool)
                    {
                        tmpPool.Unspawn(tmpHudPopup);
                    }

                    mHudPopupList.RemoveAt(i);
                }
            }
        }