public void DisplayWinner(PlayerManager.Team winner) { _winner = winner; Instantiate(winner == PlayerManager.Team.Left ? winnerPrefab : loserPrefab, teamLeftContainer); Instantiate(winner == PlayerManager.Team.Right ? winnerPrefab : loserPrefab, teamRightContainer); _animator.SetTrigger("Close"); }
private IEnumerator WinScreenAndMenu(PlayerManager.Team winningTeam) { WinScreen screen = Instantiate(winScreenPrefab, Vector3.zero, Quaternion.identity); screen.DisplayWinner(winningTeam); AkSoundEngine.SetSwitch("Music_Switch", "Combat_End", GameObject.Find("Round")); yield return(new WaitForSeconds(winScreenDisplayTime)); LoadingScreen.Instance.LoadScene(menuSceneIndex); }
private int WonRounds(PlayerManager.Team team) { return(FinishedRounds.Where((x) => x.WinnerTeam == team).ToArray().Length); }