public IEnumerator NextTurn() { Debug.Log("Next turn!"); WhoseTurnIsIt().GetComponent <GameUnit>().Sleep(); ControlHandler.instance.controlLock = true; //If the boss just ended their turn, enter a special minion phase that lasts three seconds. if (playerTurn == 1 && MinionCount() > 0) { CameraMan.instance.ChangeCameraModes(CameraMan.CameraModes.Full); WhoseTurnIsIt().GetComponent <Boss> ().RefreshMinionCharges(); Debug.Log("Special Minion Turn! Minion Count: " + minionsInGame.Count); for (int i = 0; i < minionsInGame.Count; i++) { Minion minion = minionsInGame [i].GetComponent <Minion>(); minion.WakeUp(); minion.RefreshMoves(); minion.HuntAndPester(); yield return(new WaitForSeconds(1f)); } yield return(new WaitForSeconds(2)); for (int i = 0; i < minionsInGame.Count; i++) { Minion minion = minionsInGame [i].GetComponent <Minion>(); minion.Sleep(); } } if (wispsInGame.Count > 0) { CameraMan.instance.ChangeCameraModes(CameraMan.CameraModes.Full); yield return(new WaitForSeconds(1f)); Debug.Log("Special Wisp Turn! Wisp Count: " + wispsInGame.Count); for (int i = 0; i < wispsInGame.Count; i++) { Wisp wisp = wispsInGame [i].GetComponent <Wisp>(); wisp.WakeUp(); wisp.RefreshMoves(); wisp.ScoutOrReturn(); yield return(new WaitForSeconds(2.5f)); } yield return(new WaitForSeconds(2)); } CameraMan.instance.ChangeCameraModes(CameraMan.CameraModes.Follow); playerTurn++; if (playerTurn > 4) { playerTurn = 1; } while (!WhoseTurnIsIt().GetComponent <GameUnit> ().isAlive()) { playerTurn++; } if (playerTurn > 4) { playerTurn = 1; } GameUnit playerInControl = WhoseTurnIsIt().GetComponent <GameUnit>(); if (playerInControl.GetComponent <Player> () != null) { playerInControl.GetComponent <Player>().RefreshArrows(); } playerInControl.RefreshMoves(); CameraMan.instance.SetTarget(WhoseTurnIsIt().transform); playerInControl.WakeUp(); GameTileManager.instance.UpdateActiveListBasedOnPlayerPosition(playerInControl); MenuController.instance.GetRoundStart().StartNewRound(playerInControl); yield return(new WaitForSeconds(0.5f)); ControlHandler.instance.controlLock = false; }