Esempio n. 1
0
 public void OpenNewGamePanel()
 {
     HidePanel(menuPanel, TransitionType.LeftSlide);
     if (GameManager.Instance.IsGameInProgress)
     {
         gamePanel.Show(TransitionType.RightSlide);
     }
     else
     {
         newGamePanel.Show(TransitionType.RightSlide);
     }
 }
Esempio n. 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();
    }
Esempio n. 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);
    }
Esempio n. 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);
 }
Esempio n. 5
0
 public void OpenHelpPanel()
 {
     HidePanel(menuPanel, TransitionType.BottomSlide);
     helpPanel.Show(TransitionType.TopSlide);
 }
Esempio n. 6
0
 public void OpenPlayerShortcard(PlayerShortcard s)
 {
     playerCardPanel.Show(TransitionType.Fade);
     closeShortcardButton.gameObject.SetActive(true);
     playerCard.FillPlayerCard(s.GetShortcardInfo());
 }
Esempio n. 7
0
 public void Show(string text, Action onConfirmAction)
 {
     notificationPanel.Show(TransitionType.Fade);
     notificationText.text = text;
     onConfirm             = onConfirmAction;
 }