public void PopPushPanel() { if (pushQueue.Count != 0) { if (DataManager.Manager <UIPanelManager>().IsShowPanel(PanelID.CommonPushPanel)) { return; } PushItem item = pushQueue.Dequeue(); if (item != null) { DataManager.Manager <UIPanelManager>().ShowPanel(PanelID.CommonPushPanel, panelShowAction: (pb) => { if (null != pb && pb is CommonPushPanel) { CommonPushPanel panel = pb as CommonPushPanel; panel.InitPushItem(item); m_uCurrentPushItem = item; if (!TimerAxis.Instance().IsExist(m_uPushTimerID, this)) { TimerAxis.Instance().SetTimer(m_uPushTimerID, 1000, this); } } }); } } else { if (!DataManager.Manager <UIPanelManager>().IsShowPanel(PanelID.CommonPushPanel)) { TimerAxis.Instance().KillTimer(m_uPushTimerID, this); } } }
public void OnTimer(uint uTimerID) { if (uTimerID == m_uPushTimerID) { CommonPushPanel panel = DataManager.Manager <UIPanelManager>().GetPanel(PanelID.CommonPushPanel) as CommonPushPanel; if (panel != null) { panel.RefreshLabel(); } else { TimerAxis.Instance().KillTimer(m_uPushTimerID, this); } } }