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

        auction.incrementPlayerTempBid(playerIndex);
        decreaseBid.interactable = true;

        //   TextMeshProUGUI playerBid = playerBidText.GetComponent<TextMeshProUGUI>();
        playersCurrentBid.text = auction.getTempHumanBidLevel().ToString();

        playerRemainingPoints.text = (player.GetColonialPoints() - auction.getTempHumanBidLevel()).ToString();
        Debug.Log("Colonial Points: " + player.GetColonialPoints());
        Debug.Log("Player Bid: " + auction.getPlayerBid(playerIndex));

        if (auction.tempHumanBidLevel >= player.GetColonialPoints() || player.RecognizingTheseClaims.Contains(auction.currentColonyIndex))
        {
            increaseBid.interactable = false;
        }
        else
        {
            increaseBid.interactable = true;
        }
        Debug.Log("Current high bid: " + State.CurrentColonyAuctionBid);
        if (auction.getTempHumanBidLevel() > State.CurrentColonyAuctionBid && !player.RecognizingTheseClaims.Contains(auction.currentColonyIndex))
        {
            bid.interactable = true;
        }
        else
        {
            bid.interactable = false;
        }
    }