Exemple #1
0
 public void OpenNewGamePanel()
 {
     HidePanel(menuPanel, TransitionType.LeftSlide);
     if (GameManager.Instance.IsGameInProgress)
     {
         gamePanel.Show(TransitionType.RightSlide);
     }
     else
     {
         newGamePanel.Show(TransitionType.RightSlide);
     }
 }
Exemple #2
0
    private void ShowPanel(UI_Panel panel)
    {
        LinkedListNode <UI_Panel> node = loadedPanels.First;

        switch (panel.ShowType)
        {
        case EPanelShowType.Lapped:
            break;

        case EPanelShowType.FreezeOthers:
            while (node != null)
            {
                node.Value.Freeze();
                node = node.Next;
            }
            break;

        case EPanelShowType.CloseOthers:
            while (node != null)
            {
                ClosePanel(node.Value);
                node = node.Next;
            }
            break;
        }
        panel.Show();
    }
Exemple #3
0
    private void Start()
    {
        menuPanel.gameObject.SetActive(true);
        helpPanel.gameObject.SetActive(true);
        newGamePanel.gameObject.SetActive(true);
        gamePanel.gameObject.SetActive(true);
        bottomPanel.gameObject.SetActive(true);
        notificationPanel.gameObject.SetActive(true);
        playerCardPanel.gameObject.SetActive(true);

        audioToggle.OnToggle += AudioManager.Instance.MuteAudio;

        helpPanel.OnGetFocus  += () => bottomPanel.Show(TransitionType.None);
        helpPanel.OnLoseFocus += () => bottomPanel.Hide(TransitionType.None);

        gamePanel.OnGetFocus  += () => bottomPanel.Show(TransitionType.None);
        gamePanel.OnLoseFocus += () => bottomPanel.Hide(TransitionType.None);
    }
Exemple #4
0
 public void ReturnToMenu()
 {
     HidePanel(helpPanel, TransitionType.None);
     HidePanel(newGamePanel, TransitionType.None);
     HidePanel(gamePanel, TransitionType.None);
     ClosePlayerShortcard();
     endGameButton.gameObject.SetActive(false);
     menuPanel.Show(TransitionType.Fade);
 }
Exemple #5
0
 public void OpenHelpPanel()
 {
     HidePanel(menuPanel, TransitionType.BottomSlide);
     helpPanel.Show(TransitionType.TopSlide);
 }
Exemple #6
0
 public void OpenPlayerShortcard(PlayerShortcard s)
 {
     playerCardPanel.Show(TransitionType.Fade);
     closeShortcardButton.gameObject.SetActive(true);
     playerCard.FillPlayerCard(s.GetShortcardInfo());
 }
Exemple #7
0
 public void Show(string text, Action onConfirmAction)
 {
     notificationPanel.Show(TransitionType.Fade);
     notificationText.text = text;
     onConfirm             = onConfirmAction;
 }