public void AdvanceTurn() { audioManager.PlayGavel(); float transitionDuration = 1.0f; //alert child ui managers to update their information currentTurnUIManager.UpdateTurnDisplay(transitionDuration); //prevent the player from triggering this stuff again or undoing any of their actions endTurnUIManager.SetEndTurnButtonInteractable(false); if (turnManager.NextRound > turnManager.TotalRounds) { StartCoroutine(EndGame()); } else { turnManager.AdvanceTurn(); if (turnManager.CurrentPlayer == turnManager.firstPlayer) { StartCoroutine(AITurn()); } else { endTurnUIManager.SetEndTurnButtonInteractable(true); } } }
// Update is called once per frame void Update() { if (tm.IsPlayerTurn) { if (Input.GetKeyDown(KeyCode.Q)) { SetPosition(_x + 1, _y); tg.NewLine(); tm.AdvanceTurn(); } else if (Input.GetKeyDown(KeyCode.W)) { SetPosition(_x + 2, _y); tg.NewLine(); tg.NewLine(); tm.AdvanceTurn(); } } }
private void TurnTransitionsFinished() { endTurnUIManager.SetEndTurnButtonInteractable(true); turnManager.AdvanceTurn(); }