Ejemplo n.º 1
0
    public void draw()
    {
        if (_isAnimating)
        {
            return;
        }
        if (Player == null)
        {
            return;
        }

        //GetComponent<Image>().color = Player.veryLightColor();
        GetComponent <Image>().color = Player.solidColor();
        foreach (var text in Chips.GetComponentsInChildren <TMPro.TextMeshProUGUI>())
        {
            text.text = Player.NumChips.ToString();
        }

        TotalScore.text = "=" + Player.totalScore();
        if (Player.AcceptedGifts.Count != drawnCards.Count)
        {
            CardContainer.gameObject.DestroyChildrenImmediate();
            drawnCards = new List <int>(Player.AcceptedGifts);

            int priorGift = -1;
            foreach (int gift in drawnCards)
            {
                if ((priorGift != -1) && (gift > priorGift + 1))
                {
                    GameObject spacer = Instantiate(this.SpacePrefab);
                    spacer.transform.SetParent(CardContainer, false);
                }

                GameObject card = Instantiate(CardPrefab);
                card.GetComponent <CardGUI>().draw(gift, gift > priorGift + 1);
                card.transform.SetParent(CardContainer, false);

                priorGift = gift;
            }
            DialogGUI.draw();
        }



        DialogGUI.draw();
    }
Ejemplo n.º 2
0
    public void draw()
    {
        if (_isAnimating)
        {
            return;
        }
        if (Player == null)
        {
            return;
        }

        //GetComponent<Image>().color = Player.veryLightColor();


        DialogGUI.draw();
    }