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));
    }
Esempio n. 2
0
    private void playerBid()
    {
        Debug.Log("Player bids >>>>>>>>>>>>>>>>>>>>>>>>>>>>");
        AuctionHandler auction     = State.getAuctionHandler();
        App            app         = UnityEngine.Object.FindObjectOfType <App>();
        int            playerIndex = app.GetHumanIndex();
        int            playerBid   = auction.getTempHumanBidLevel();

        auction.setPlayerBid(playerIndex, playerBid);
        auction.setIndexOfHighestBidderSoFar(playerIndex);
        //State.CurrentColonyAuctionBid = auction.getPlayerBid(playerIndex);
        State.UpdateColonyAuctionBid(auction.getPlayerBid(playerIndex));
        auction.incrementBiddingPosition();

        nextAuctionPhase();
    }