public void CloseMenu() { if (dontSoundOnStartUp == false && buyPanelActive == true) { audioOut.PlayOneShot(acClickOff, 0.8f); } else { dontSoundOnStartUp = false; } fpPanel.CloseFinalPanel(); //win panel can be called like this WinPanel script = winPanel.GetComponent <WinPanel>(); if (script == null) { Debug.Log("OpenWinPanel in Menubutton couldnt get reference to the win panel script."); } else { script.SetMovePanelOut(); } // move the canvas out backGroundFade.SetActive(false); //winPanel.SetActive(false); bPanel.SetMovePanelOut(); buyPanelActive = false; closeMenuOneShot = true; DisableMenuButton(false); gScript.PauseGame(false); }
public void GoBack() { audioOut.PlayOneShot(acClickOn, 0.8f); fpPanel.CloseFinalPanel(); }