예제 #1
0
 public void ShowPanel(int panelIndex)
 {
     if (panelIndex == 1)
     {
         ShowPanelOnly(_currentPanel = (MainMenuPanelType)panelIndex);
     }
     Debug.Log($"ShowPanel: {_currentPanel}");
 }
예제 #2
0
    public void CreditsOnClick()
    {
        if (Input.GetKey(KeyCode.E) && Input.GetKey(KeyCode.R))
        {
            ShowPanelOnly(_currentPanel = MainMenuPanelType.Credits);
            return;
        }

        GameController.Instance.GameScene = GameScene.Credits;
    }
예제 #3
0
        public void OpenPanel(MainMenuPanelType panelType)
        {
            int index = (int)panelType;

            if (index < panels.Length)
            {
                openedPanel = panels[index];
                openedPanel.SetActive(true);
            }
        }
예제 #4
0
    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;
        }
    }
예제 #5
0
 public void OptionsOnClick()
 {
     ShowPanelOnly(_currentPanel = MainMenuPanelType.Options);
 }
예제 #6
0
 private void ShowPanelOnly(MainMenuPanelType panelType)
 {
     HideAllPanels();
     _panels[(int)panelType].SetActive(true);
 }
예제 #7
0
 private void ShowPanel(MainMenuPanelType panelType)
 {
     _panels[(int)panelType].SetActive(true);
 }
예제 #8
0
 private void Init()
 {
     HideAllPanels();
     _currentPanel = MainMenuPanelType.Main;
     ShowPanel(_currentPanel);
 }