// enables panel if it's next in queue public void CheckPanelQueue() { Debug.Log("Panel Queue checked: " + panelQueue.Count + " panels in queue."); if (panelQueue.Count > 0) { UICanvasHandler.instance.EnableMainSceneButtons(false); if (panelQueue.Peek().Equals(notifyPanel.panelID)) { notifyPanel.EnablePanel(); } else if (panelQueue.Peek().Equals(questPanel.panelID)) { questPanel.EnablePanel(); } else if (panelQueue.Peek().Equals(questRewardPanel.panelID)) { questRewardPanel.EnablePanel(); } else if (panelQueue.Peek().Equals(yourTurnPanel.panelID)) { yourTurnPanel.EnablePanel(); } else if (panelQueue.Peek().Equals(boardScanPanel.panelID)) { boardScanPanel.EnablePanel(); } else if (panelQueue.Peek().Equals(crisisPanel.panelID)) { crisisPanel.EnablePanel(); } else if (panelQueue.Peek().Equals(chooseSpellcasterPanel.panelID)) { chooseSpellcasterPanel.EnablePanel(); } else if (panelQueue.Peek().Equals(spellCastNotifPanel.panelID)) { spellCastNotifPanel.EnablePanel(); } } else { UICanvasHandler.instance.EnableMainSceneButtons(true); // also have to disable dice button if it's not player's turn UICanvasHandler.instance.EnableDiceButton(GameObject.FindGameObjectWithTag("LocalPlayer").GetComponent <Player>().bIsMyTurn); } }