public void DoChangePanel_FadeInout(ENUM_Panel_Name ePanelHide, ENUM_Panel_Name ePanelShow, float fFadeTime = 1f) { CUIPanelData pPanelHide = _mapPanelData[ePanelHide]; CUIPanelData pPanelShow = _mapPanelData[ePanelShow]; int iSortOrder = 0; if (pPanelShow.p_pPanel.p_bIsFixedSortOrder == false) { iSortOrder = CaculateSortOrder_Top(); } pPanelShow.EventSetOrder(iSortOrder); AutoFade.DoStartFade(fFadeTime, Color.black, pPanelHide.DoHide, pPanelShow.DoShow); }
public void DoShowPanel_FadeIn(ENUM_Panel_Name ePanel, float fFadeTime = 1f) { CUIPanelData pPanel = _mapPanelData[ePanel]; int iSortOrder = 0; if (pPanel.p_pPanel.p_bIsFixedSortOrder == false) { iSortOrder = CaculateSortOrder_Top(); } pPanel.EventSetOrder(iSortOrder); AutoFade.DoStartFade(fFadeTime, Color.black, pPanel.DoShow); }
private int CaculateSortOrder_Top() { p_iSortOrderTop = 0; List <CUIPanelData> listUIPanel = _mapPanelData.Values.ToList(); for (int i = 0; i < listUIPanel.Count; i++) { CUIPanelData pUIPanelData = listUIPanel[i]; if (pUIPanelData.p_pPanel.isActiveAndEnabled) { if (pUIPanelData.p_pPanel.p_bIsFixedSortOrder) { ++p_iSortOrderTop; } else { pUIPanelData.EventSetOrder(++p_iSortOrderTop); } } } p_iSortOrderTop += 1; return(p_iSortOrderTop); }