Esempio n. 1
0
    public void DecreaseBid()
    {
        Debug.Log("Decrease bid");
        AuctionHandler auction     = State.getAuctionHandler();
        App            app         = UnityEngine.Object.FindObjectOfType <App>();
        int            playerIndex = app.GetHumanIndex();
        Nation         player      = State.getNations()[playerIndex];

        auction.decreasePlayerTempBid(playerIndex);
        // TextMeshProUGUI playerBid = playerBidText.GetComponent<TextMeshProUGUI>();
        playersCurrentBid.text   = auction.getTempHumanBidLevel().ToString();
        increaseBid.interactable = true;
        if (auction.getPlayerBid(playerIndex) == 0)
        {
            decreaseBid.interactable = false;
        }
        Debug.Log("Current high bid: " + State.CurrentColonyAuctionBid);
        if (auction.getTempHumanBidLevel() > State.CurrentColonyAuctionBid)
        {
            bid.interactable = true;
        }
        else
        {
            bid.interactable = false;
        }
        playerRemainingPoints.text = (player.GetColonialPoints() - auction.getTempHumanBidLevel()).ToString();

        Debug.Log("Colonial Points: " + player.GetColonialPoints());
        Debug.Log("Player Bid: " + auction.getPlayerBid(playerIndex));
    }