Exemplo n.º 1
0
    public void RefreshUI(DataNeededForPlayerUI data)
    {
        playerInfoBox.UpdateUI(data);

        if (data.isTrickWinner)
        {
            if (ThrownCard != null)
            {
                ThrownCard.GetComponent <CardVisualBehavior>().EnableHighlight(true);
            }
        }
    }
Exemplo n.º 2
0
    private void UpdateSelfPlayerUI()
    {
        DataNeededForPlayerUI data = SelfGatherDataNeededForPlayerUI();

        if (isLocalPlayer)
        {
            playerSelfViewBehavior?.RefreshUI(data);
        }
        else
        {
            otherPlayerViewBehavior?.RefreshUI(data);
        }
    }
Exemplo n.º 3
0
    public void RefreshUI(DataNeededForPlayerUI data)
    {
        cardHandBehavior.SetSelectableCards(data.isMyTurn, data.leadingSuit);
        TurnText.enabled = data.isMyTurn;
        TrumpCardScript.SetCard(data.trumpCard);
        playerInfoBox.UpdateUI(data);

        string trickWinnerName = data.trickWinnerNameToShow;

        TrickWinnerText.enabled = trickWinnerName != null;
        if (trickWinnerName != null)
        {
            TrickWinnerText.text = trickWinnerName + " won the trick.";
        }

        if (data.isTrickWinner)
        {
            if (ThrownCard != null)
            {
                ThrownCard.GetComponent <CardVisualBehavior>().EnableHighlight(true);
            }
        }
    }
Exemplo n.º 4
0
 public void UpdateUI(DataNeededForPlayerUI data)
 {
     UpdateUI(data.playerName, data.currentTricks, data.currentScore, data.currentBid, data.isMyTurn, data.isTrickWinner);
 }