Exemplo n.º 1
0
    public void DecreaseBid()
    {
        AuctionHandler auction     = State.getAuctionHandler();
        App            app         = UnityEngine.Object.FindObjectOfType <App>();
        int            playerIndex = app.GetHumanIndex();
        Nation         player      = State.getNations()[playerIndex];

        auction.decreasePlayerBid(playerIndex);
        TextMeshProUGUI playerBid = playerBidText.GetComponent <TextMeshProUGUI>();

        playerBid.text = auction.getPlayerBid(playerIndex).ToString();
        if (auction.getPlayerBid(playerIndex) == 0)
        {
            increceBid.gameObject.SetActive(true);
            decreaseBid.gameObject.SetActive(false);
        }
        if (auction.getPlayerBid(playerIndex) > auction.getCurrentBid())
        {
            bid.interactable = true;
        }
        else
        {
            bid.interactable = false;
        }
    }