示例#1
0
        HudPopupBase GetPopupInstance(EHudPopupType popupType)
        {
            ObjectPoolBase tmpPool = GetPoolByType(popupType);

            if (null == tmpPool)
            {
                return(null);
            }

            var tmpHudPopupBase = tmpPool.Spawn2() as HudPopupBase;

            if (null != tmpHudPopupBase)
            {
                tmpHudPopupBase.Initialize(Parent);
                mHudPopupList.Add(tmpHudPopupBase);
            }

            return(tmpHudPopupBase);
        }
示例#2
0
        HudInfoBase CreateHudInfo(EUnitType unitType)
        {
            ObjectPoolBase tmpObjPool = GetPoolByType(unitType);

            return(null == tmpObjPool ? null : tmpObjPool.Spawn2() as HudInfoBase);
        }