Example #1
0
    void ShowChoice()
    {
        if (decisionQueue.Count == 0)
        {
            Clear();
            Visuals.SetActive(false);
        }
        else
        {
            Visuals.SetActive(true);
            Choice      nextChoice      = decisionQueue[0];
            List <byte> cardsNotOnBoard = HighlightChoicesOnBoard(nextChoice.Options, nextChoice.Highlight);
            if (cardsNotOnBoard.Count == 0)
            {
                CardsNotInPlay.gameObject.SetActive(false);
            }
            else
            {
                CardsNotInPlay.gameObject.SetActive(true);
                CardsNotInPlay.SetValues(cardsNotOnBoard);
            }

            if (nextChoice.Cancel != null)
            {
                CancelButton.Visuals.SetActive(true);
                CancelButton.SetHighlight(Color.blue);
            }
            else
            {
                CancelButton.Visuals.SetActive(false);
                CancelButton.ClearHighlight();
            }

            if (nextChoice.Pass != null)
            {
                PassButton.Visuals.SetActive(true);
                PassButton.SetHighlight(Color.red);
            }
            else
            {
                PassButton.Visuals.SetActive(false);
                PassButton.ClearHighlight();
            }
        }
    }