Example #1
0
    public override void Click()
    {
        window = canvas.GetComponentInChildren <TilePopupUIManager>().OpenVacant();
        VacantUI ui = window.GetComponent <VacantUI>();

        ui.building = this;
        ui.FillFields(name, price);
    }
Example #2
0
    public void StartBidding(VacantUI vacant)
    {
        startingCostText.text = "";
        playerCount           = 0;
        playerInCount         = 4;
        startingCost          = 0;
        biddingTimer          = bidTimer;

        uiText.text = "";
        doneBidding = true;
        player1bid  = false; player2bid = false; player3bid = false; player4bid = false;

        first     = false;
        roundOver = false; countingDown = false;

        player1first = false; player2first = false; player3first = false; player4first = false;

        player1ready = false; player2ready = false; player3ready = false; player4ready = false;
        readyUp      = false;
        Debug.Log("i count that there are " + playerCount.ToString() + "players");

        readyUp  = true;
        vacantui = vacant;
        camera.TurnCanMoveFalse();

        Debug.Log("Gamecontroller says there are " + gameController.playerCount.ToString() + "players");
        for (int i = 0; i < playerPanels.Length; i++)
        {
            playerPanels[i].SetActive(i < gameController.playerCount);
        }

        /*
         * for (int i = gameController.playerCount; i < playerPanels.Length; i++) {
         *  playerPanels[i].SetActive(false);
         * }
         */
        /*for (int i = 0; i < playerBidDisplays.Length; i++) {
         *  playerBidDisplays[i].text = "";
         * }*/
        vacantTile            = vacant.building;
        bids                  = new double[] { vacantTile.price, vacantTile.price, vacantTile.price, vacantTile.price };
        startingCost          = vacantTile.price;
        startingCostText.text = "Starting Cost: $" + startingCost.ToString();
        //biddingPanel.SetActive(true);
        //winnerPanel.SetActive(false);
        //tiedPanel.SetActive(false);
        //doneBidding = false;
        biddingTimer = bidTimer;
        uiText.text  = readyUpText;
        for (int i = 0; i < playerPanels.Length; i++)
        {
            if (playerPanels[i].activeSelf == true)
            {
                playerCount += 1;
                Debug.Log("i count that there are " + playerCount.ToString() + "players");
            }
        }
    }