// Exit Buttons private void Btn_Exit_Buttons_Click(object sender, EventArgs e) { switch ((sender as Button).Name) { case "BtnIgen": Close(); break; case "BtnNem": PanelExit.Hide(); BtnExit.Show(); break; } }
public void Start() { PanelExit.SetActive(false); if (AppManager.instance.ShowDetailPanel) { PanelDetails.SetActive(true); } else { PanelDetails.SetActive(false); } DesableAll(); ButtonTractor(); }
void Update() { if (Input.GetKeyDown(KeyCode.Escape)) { //PanelExit.SetActive(true); if (PanelDetails.activeSelf) { PanelDetails.SetActive(false); return; } else { // Go back to main Sceen //AppManager.instance.ShowDetailPanel = false; //AppManager.instance.CurrentScreenIndex = 1; //UnityEngine.SceneManagement.SceneManager.LoadScene(1); PanelExit.SetActive(true); } } }
private void UpdateUI() { switch (MenuState) { case MenuStateEnum.Init: PanelMainMenu.SetActive(true); PanelPlay.SetActive(false); PanelSettings.SetActive(false); PanelExit.SetActive(false); PanelSinglePlayer.SetActive(false); PanelMultiPlayer.SetActive(false); PanelStartSinglePlayer.SetActive(false); PanelStartMultiPlayer.SetActive(false); break; case MenuStateEnum.Play: PanelMainMenu.SetActive(true); PanelPlay.SetActive(true); PanelSettings.SetActive(false); PanelExit.SetActive(false); PanelSinglePlayer.SetActive(false); PanelMultiPlayer.SetActive(false); PanelStartSinglePlayer.SetActive(false); PanelStartMultiPlayer.SetActive(false); break; case MenuStateEnum.SinglePlayerPlay: PanelMainMenu.SetActive(true); PanelPlay.SetActive(true); PanelSettings.SetActive(false); PanelExit.SetActive(false); PanelSinglePlayer.SetActive(true); PanelMultiPlayer.SetActive(false); PanelStartSinglePlayer.SetActive(false); PanelStartMultiPlayer.SetActive(false); break; case MenuStateEnum.SinglePlayerControllerDetectionPhase: PanelMainMenu.SetActive(true); PanelPlay.SetActive(true); PanelSettings.SetActive(false); PanelExit.SetActive(false); PanelSinglePlayer.SetActive(true); PanelMultiPlayer.SetActive(false); PanelStartSinglePlayer.SetActive(true); PanelStartMultiPlayer.SetActive(false); break; case MenuStateEnum.MultiPlayerPlay: PanelMainMenu.SetActive(true); PanelPlay.SetActive(true); PanelSettings.SetActive(false); PanelExit.SetActive(false); PanelSinglePlayer.SetActive(false); PanelMultiPlayer.SetActive(true); PanelStartSinglePlayer.SetActive(false); PanelStartMultiPlayer.SetActive(false); break; case MenuStateEnum.MultiPlayerControllerDetectionPhase: PanelMainMenu.SetActive(true); PanelPlay.SetActive(true); PanelSettings.SetActive(false); PanelExit.SetActive(false); PanelSinglePlayer.SetActive(false); PanelMultiPlayer.SetActive(true); PanelStartSinglePlayer.SetActive(false); PanelStartMultiPlayer.SetActive(true); break; case MenuStateEnum.Settings: PanelMainMenu.SetActive(true); PanelPlay.SetActive(false); PanelSettings.SetActive(true); PanelExit.SetActive(false); PanelSinglePlayer.SetActive(false); PanelMultiPlayer.SetActive(false); PanelStartSinglePlayer.SetActive(false); PanelStartMultiPlayer.SetActive(false); break; case MenuStateEnum.Exit: PanelMainMenu.SetActive(true); PanelPlay.SetActive(false); PanelSettings.SetActive(false); PanelExit.SetActive(true); PanelSinglePlayer.SetActive(false); PanelMultiPlayer.SetActive(false); PanelStartSinglePlayer.SetActive(false); PanelStartMultiPlayer.SetActive(false); break; } }
// Exit private void BtnKilepes_Click(object sender, EventArgs e) { BtnExit.Hide(); PanelExit.Show(); }