public void ShowPanel(int panelIndex) { if (panelIndex == 1) { ShowPanelOnly(_currentPanel = (MainMenuPanelType)panelIndex); } Debug.Log($"ShowPanel: {_currentPanel}"); }
public void CreditsOnClick() { if (Input.GetKey(KeyCode.E) && Input.GetKey(KeyCode.R)) { ShowPanelOnly(_currentPanel = MainMenuPanelType.Credits); return; } GameController.Instance.GameScene = GameScene.Credits; }
public void OpenPanel(MainMenuPanelType panelType) { int index = (int)panelType; if (index < panels.Length) { openedPanel = panels[index]; openedPanel.SetActive(true); } }
public void BackOnClick() { switch (_currentPanel) { case MainMenuPanelType.New: // Debug.Log($"Pressed Back from New"); ShowPanelOnly(_currentPanel = MainMenuPanelType.Main); break; case MainMenuPanelType.Options: // Debug.Log($"Pressed Back from Options"); ShowPanelOnly(_currentPanel = MainMenuPanelType.Main); break; case MainMenuPanelType.Credits: // Debug.Log($"Pressed Back from Credits"); ShowPanelOnly(_currentPanel = MainMenuPanelType.Main); break; } }
public void OptionsOnClick() { ShowPanelOnly(_currentPanel = MainMenuPanelType.Options); }
private void ShowPanelOnly(MainMenuPanelType panelType) { HideAllPanels(); _panels[(int)panelType].SetActive(true); }
private void ShowPanel(MainMenuPanelType panelType) { _panels[(int)panelType].SetActive(true); }
private void Init() { HideAllPanels(); _currentPanel = MainMenuPanelType.Main; ShowPanel(_currentPanel); }