示例#1
0
    public void contiueToAuction()
    {
        increaseBid.gameObject.SetActive(true);
        decreaseBid.gameObject.SetActive(true);
        App    app         = UnityEngine.Object.FindObjectOfType <App>();
        int    playerIndex = app.GetHumanIndex();
        Nation player      = State.getNations()[playerIndex];

        Debug.Log("Coutinune to Auction @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" + State.GetPhase().ToString());

        tradeResultsExit.Play();
        tradeResultsPanel.SetActive(false);

        //State.advanceGamePhase();
        Debug.Log("GamePhase is: " + State.GetPhase().ToString());
        // Check if should to go auction (if enough turns have gone by)
        int turn = State.turn;

        if (turn > 5 && turn % 3 == 0)
        {
            // Debug.Log("Auction Time? It is Turn: " + State.turn);
            AuctionHandler auction = State.getAuctionHandler();

            auction.NewAuction();
            prepareAuctionPanel(auction);
            openAuctionPanel();

            nextAuctionPhase();
            turnButton.interactable = true;
        }
        else
        {
            // turnButton.interactable = true;
            continueToEvents();
            // Have these guys only get called after all events are resolved
            // Probably want to have at least one Decision Event come up and have the final one call continueToNextTurn when
            // the event queue is empty
            turnButton.interactable = true;

            continueToNextTurn();
        }
    }