public override void Dispose() { base.Dispose(); ObjectPoolBase tmpObjPool = GetPoolByType(Parent.UnitType); if (null != tmpObjPool) { tmpObjPool.Unspawn(mHudInfo); } mHudInfo = null; }
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(); }
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); } } }