Example #1
0
        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");
        }
Example #2
0
        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);
        }
Example #3
0
 private int WonRounds(PlayerManager.Team team)
 {
     return(FinishedRounds.Where((x) => x.WinnerTeam == team).ToArray().Length);
 }