Beispiel #1
0
    public void IncrementScoreForTeamAndType(Team team, ScoreIncrementType type, int multiplier = 1)
    {
        ScoreAndDescriptionPair scorePair    = ScoreAndDescriptionForType(type);
        ScoreAndDescriptionPair newScorePair = new ScoreAndDescriptionPair(scorePair.score * multiplier, scorePair.description);

        IncrementScoreForTeam(newScorePair.score, team);
        if (ShouldEmitScoreForType(type))
        {
            EmitScoreAndDescriptionForTeam(newScorePair, team);
            EmphasizeScoreTextForTeam(team);
        }
    }
Beispiel #2
0
    private void EmitScoreAndDescriptionForTeam(ScoreAndDescriptionPair pair, Team team)
    {
        switch (team)
        {
        case Team.Blue:
            BlueScoreEmitter.EmitScoreWithDescription(pair.score, pair.description);
            break;

        case Team.Purple:
            PurpleScoreEmitter.EmitScoreWithDescription(pair.score, pair.description);
            break;
        }
    }