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

            ObjectPoolBase tmpObjPool = GetPoolByType(Parent.UnitType);

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

            mHudInfo = null;
        }
Beispiel #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();
        }
Beispiel #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);
                }
            }
        }