public void ClosePanel(PanelBase panel) { CurrentPanel = null; GameController.Instance.ResumeGame(); EscapeHandler.Instance.EscapeHandling -= ClosePanel; panel.Close(0.5f); }
public void OpenPanel(PanelBase panel) { if (_currentPanel != null) { _currentPanel.Close(); } if (panel == _currentPanel) { _currentPanel = null; return; } _currentPanel = panel; _currentPanel.Open(); }