Esempio n. 1
0
    /// <summary>
    /// 지정된 Panel을 열거나 끕니다.
    /// </summary>
    /// <param name="ePanel">Panel 이름의 Enum</param>
    /// <param name="bShow"></param>
    public CLASS_Panel DoShowHide_Panel(ENUM_Panel_Name ePanel, bool bShow, System.Action OnFinishAnimation = null)
    {
        CUIPanelData pPanel = _mapPanelData[ePanel];

        if (pPanel == null)
        {
            Debug.LogWarning(ePanel + "이 없습니다.. 하이어라키를 확인해주세요");
            return(null);
        }

        if (bShow)
        {
            int iSortOrder = 0;
            if (pPanel.p_pPanel.p_bIsFixedSortOrder == false)
            {
                iSortOrder = CaculateSortOrder_Top();
            }

            _Stack_OpendPanel.Push(pPanel.p_pPanel);
            pPanel.DoShow(iSortOrder);
        }
        else
        {
            pPanel.DoHide();
        }

        if (OnFinishAnimation != null)
        {
            pPanel.DoSetFinishAnimationEvent(OnFinishAnimation);
        }

        return(pPanel.p_pPanel);
    }
Esempio n. 2
0
    /// <summary>
    /// 지정된 Panel을 열거나 끕니다.
    /// </summary>
    /// <param name="ePanel">Panel 이름의 Enum</param>
    /// <param name="bShow"></param>
    public CLASS_Panel DoShowHide_Panel(ENUM_Panel_Name ePanel, bool bShow)
    {
        CUIPanelData pPanel = _mapPanelData[ePanel];

        if (pPanel == null)
        {
            Debug.LogWarning(ePanel + "이 없습니다.. 하이어라키를 확인해주세요");
            return(null);
        }

        if (bShow)
        {
            int iSortOrder = 0;
            if (pPanel.p_pPanel.p_bIsFixedSortOrder == false)
            {
                iSortOrder = CaculateSortOrder_Top();
            }

            pPanel.DoShow(iSortOrder);
        }
        else
        {
            pPanel.DoHide();
        }

        return(pPanel.p_pPanel);
    }
Esempio n. 3
0
    /// <summary>
    /// 지정된 Panel가 열려있으면 끄고, 꺼져있으면 켭니다.
    /// </summary>
    /// <param name="ePanel">Panel 이름의 Enum</param>
    /// <param name="bShow"></param>
    public CLASS_Panel DoShowHide_Panel_Toggle(ENUM_Panel_Name ePanel)
    {
        CUIPanelData pPanel = _mapPanelData[ePanel];

        if (pPanel == null)
        {
            Debug.LogWarning(ePanel + "이 없습니다.. 하이어라키를 확인해주세요");
            return(null);
        }

        bool bShow = !pPanel.p_bIsShowCurrent;

        if (bShow)
        {
            int iSortOrder = 0;
            if (pPanel.p_pPanel.p_bIsFixedSortOrder == false)
            {
                iSortOrder = CaculateSortOrder_Top();
            }

            _Stack_OpendPanel.Push(pPanel.p_pPanel);
            pPanel.DoShow(iSortOrder);
        }
        else
        {
            pPanel.DoHide();
        }

        return(pPanel.p_pPanel);
    }