public void EndMinigame() { EndMinigameMechanics(); StopAllCoroutines(); ToggleActive(false); SoundEventInfo sei = new SoundEventInfo(applauseSound, applauseSoundVolume, 2); EventHandler.Instance.FireEvent(EventHandler.EventType.SoundEvent, sei); if (gameType == GameType.PointsBased || gameType == GameType.PointsAndLives) { StartCoroutine("DisplayPlayerScores"); } else if (gameType == GameType.Finale) { var playerPoints = new Dictionary <Player, int>(); foreach (var item in MinigamePointSystem.GetCurrentScore()) { playerPoints.Add(item.Key, (int)(item.Value * ImportManager.Instance.Settings.FinaleScoreMultiplier)); } MinigamePointSystem.UpdateScore(playerPoints); ShowStandingsUI(); StartCoroutine("GoToNextScene", endOfMatchDelay); } else { ShowStandingsUI(); StartCoroutine("GoToNextScene", endOfMatchDelay); } }
private void UpdatePointSystem(Player p, int points) { var playerPoints = new Dictionary <Player, int>(); playerPoints.Add(p, points); MinigamePointSystem.UpdateScore(playerPoints); }