public IEnumerator CheckWinner(float delay) { // checks for winner if (GameData.GetCurrPlayer().IsAllDone()) { // we have a winner, set the mode to win yield return(new WaitForSeconds(delay)); GameData.SetGameMode(GameData.Mode.Winner); //show the winning screen GameGUI.ShowWinScreen(); //update applicationExited analytics GameGUI.analyticsApplicationExited.GameCompleted(); //activate the winning visual effect tileEffects["win"].activateEffect(new Vector2(0, 0)); // celebrate GameData.GetCurrPlayer().Celebrate(); //play winning sound Audio.PlayVictory(); } else { // go to next player StartCoroutine(NextTurn(delay)); } }