public void ShowPanel(menuPanel panel) { if (currentPanel != null) { currentPanel.TransitionOut(); } currentPanel = panel; //check if desired panel is pre game panel. Reenable if it is if (panel == PreGamePanel) { panel.gameObject.SetActive(true); } if (panel == MainPanel) { gameController.instance.resetGameState(); } panel.TransitionIn(); }
public void HidePanel() { currentPanel.TransitionOut(); currentPanel = null; }