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