Esempio n. 1
0
    private void Turn_Button()
    {
        if(State.turn >= demoTurnLimit)
        {
            endGameMessage.SetActive(true);
            return;
        }
        turnButton.interactable = false;
        Debug.Log("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
        Debug.Log("Begin turn processing...");
        Debug.Log("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
        Debug.Log("Current phase: " + State.GetPhase());
        //  blockPlayerFromActing();
        //turnPopUpEnter.Play();
        App app = UnityEngine.Object.FindObjectOfType<App>();
        int playerIndex = app.GetHumanIndex();
        Nation player = State.getNations()[playerIndex];
        //State.turn++;
        PlayerProcessor.processSignals(player);
           // MarketHelper.resetBidsAndOffers();
          //  maintenancePayer.payMaintenance(player);
        PlayerCollector.collectForPlayer(player);

        // Texting ======================================================================================
        turnHandler.processTurnAdmin();
        State.advanceGamePhase();
        State.tradeHandler.handleTrades();

        WorldBank bank = State.bank;
        Debug.Log("Banking           Banking                     Banking");
        bank.collectInterest();
        bank.distributeCollectedInterest();
        Debug.Log("Finished Banking - should not proceed to Trade Results");
        showTradeResults(player);
        TradeResults.SetActive(true);
         tradeResultsEnter.Play();
        //turnPopUpExit.Play();
           // payCoalMaintaince(player);
        updateHeaderValues();
        if (State.turn == 40)
        {
            eraUpdater.swichEra();
        }
        if (State.turn == 80)
        {
            eraUpdater.swichEra();

        }
    }