public void SetPanels() { switch (Director.Instance.currentScene) { case Structs.GameScene.Menu: panelMenu.Show(); panelHUD.Hide(); panelLoading.Hide(); panelScore.Hide(); panelPause.Hide(); break; case Structs.GameScene.Ingame: panelMenu.Hide(); panelHUD.Show(); panelLoading.Hide(); panelScore.Hide(); panelPause.Hide(); if (Director.Instance.currentGameMode == Structs.GameMode.Multi3players) { health[2].transform.parent.gameObject.SetActive(true); } else { health[2].transform.parent.gameObject.SetActive(false); } break; case Structs.GameScene.Score: panelMenu.Hide(); panelHUD.Hide(); panelLoading.Hide(); panelScore.Show(); panelPause.Hide(); break; case Structs.GameScene.LoadingGame: panelMenu.Hide(); panelHUD.Hide(); panelLoading.Show(); panelScore.Hide(); panelPause.Hide(); break; default: panelMenu.Hide(); panelHUD.Hide(); panelLoading.Hide(); panelScore.Hide(); panelPause.Hide(); break; } }
void mostrarmenu() { if (botonO == 0) { PanelMenu.Hide(); btnMenu2.Show(); botonO = 1; } else { PanelMenu.Show(); botonO = 0; btnMenu2.Hide(); } }
// Hides and deletes the screen on top of the stack and sets as active the next // if there is one public void BackScreen(UnityAction listener = null) { if (loadedMenus.Count > 0) { PanelMenu topScreen = loadedMenus.Pop(); if (listener != null) { topScreen.OnMenuHidden.AddListener(listener); } topScreen.OnMenuHidden.AddListener( () => { if (loadedMenus.Count > 0) { loadedMenus.Peek().Show(); } Destroy(topScreen.gameObject); } ); topScreen.Hide(true); } }
private void btnMenu_Click(object sender, EventArgs e) { PanelMenu.Hide(); btnMostrar.Show(); }