public void ChangePanels(BattlePanel targetPanel) { //Hide the old panel if (currentPanel != null) { currentPanel.Hide(); } //Show the new panel currentPanel = targetPanel; if (currentPanel != null) { currentPanel.Show(); } }