Example #1
0
        public void Popup <A, B>(EHudPopupType popupType, A a, B b)
        {
            HudPopupBase tmpHudPopup = GetPopupInstance(popupType);

            if (null == tmpHudPopup)
            {
                return;
            }

            if (tmpHudPopup is IPopupStart2 <A, B> )
            {
                (tmpHudPopup as IPopupStart2 <A, B>).StartPopup(a, b);
            }
        }
Example #2
0
        public void Popup(EHudPopupType popupType)
        {
            HudPopupBase tmpHudPopup = GetPopupInstance(popupType);

            if (null == tmpHudPopup)
            {
                return;
            }

            if (tmpHudPopup is IPopupStart0)
            {
                (tmpHudPopup as IPopupStart0).StartPopup();
            }
        }
Example #3
0
        ObjectPoolBase GetPoolByType(EHudPopupType popupType)
        {
            ObjectPoolBase tmpObjPool = null;

            switch (popupType)
            {
            case EHudPopupType.Damage:
                tmpObjPool = Game.PoolMgr.GetObjectPool <HudPopupDamage>() as ObjectPoolBase;
                break;

            default:

                break;
            }

            return(tmpObjPool);
        }
Example #4
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);
        }