private void DrawModeSpecific() { DrawModeSpecificPerPlayer(); switch ((GameType)Core.Cookies["CurrentGameType"]) { case GameType.NORMAL: break; case GameType.COOPERATIVE: var totalScore = (from e in Core.Players where e.Playing select e.Score).Sum(); _coopScoreDisplay.Draw(); FontManager.DrawString("" + totalScore, "LargeFont", Core.Metrics["EvaluationTotalScore", 0], Color.White, FontAlign.Right); int gradeIndex = _grades[0]; _gradeSpriteMap.Draw(gradeIndex, 150, 52, Core.Metrics["EvaluationTotalGrade", 0]); break; case GameType.TEAM: case GameType.VS_CPU: var teamAScore = (from e in Core.Players where (e.Playing && e.Team == 1) select e.Score).Sum(); var teamBScore = (from e in Core.Players where (e.Playing && e.Team == 2) select e.Score).Sum(); _teamScoreMeter.BlueScore = teamAScore; _teamScoreMeter.RedScore = teamBScore; _teamScoreMeter.Draw(); _teamScoreMeter.Update(); break; } }
private void DrawTeamCombinedScores() { double blueScore = 0, redScore = 0; for (int x = 0; x < 4; x++) { if (!Players[x].Playing) { continue; } if (Players[x].Team == 1) { blueScore += _displayedScores[x]; } else if (Players[x].Team == 2) { redScore += _displayedScores[x]; } } _teamScoreMeter.BlueScore = (long)Math.Ceiling(blueScore); _teamScoreMeter.RedScore = (long)Math.Ceiling(redScore); _teamScoreMeter.Size = _metrics["TeamScoreBase.Size", 0]; if (Players[0].Playing || Players[1].Playing) { _teamScoreMeter.Position = (_metrics["TeamScoreBase", 0]); _teamScoreMeter.Draw(); } if (Players[2].Playing || (Players[3].Playing)) { _teamScoreMeter.Position = (_metrics["TeamScoreBase", 1]); _teamScoreMeter.Draw(); } _teamScoreMeter.Update(); }