Beispiel #1
0
    // Changes the phase and updates the UI as needed
    public static IEnumerator ChangeTurn()
    {
        UIMaster.SetActionPanel(false);

        yield return(AlterState()); // pauses before executing the rest of the code based on phase.

        if (PlayerMaster.PriorTurn == 0)
        {
            yield return(EndofRound());
        }

        if (gP != GamePhase.Attack)
        {
            PlayerMaster.SwitchPlayer();
            TopDownCamera.ChangePlayerCamera();
        }

        UIMaster.ChangeDisplayedPlayer();
        UIMaster.ChangePlayerDeploy(gP);
        UIMaster.DisplayState(gP, PlayerMaster.CurrentTurn);

        turnNum++;

        yield return(null);
    }