Esempio n. 1
0
        private void RemovePlayerObjectiveTicksFromTeamAggregate(Player player)
        {
            var teamUpdates = new ScrimEventAggregateRoundTracker();

            var playerTracker = player.EventAggregateTracker;

            var playerMaxRound = playerTracker.HighestRound;
            var teamMaxRound   = EventAggregateTracker.HighestRound;

            var maxRound = playerMaxRound >= teamMaxRound ? playerMaxRound : teamMaxRound;

            for (var round = 1; round <= maxRound; round++)
            {
                if (playerTracker.TryGetTargetRoundStats(round, out var roundStats))
                {
                    var tempStats = new ScrimEventAggregate();

                    tempStats.ObjectiveCaptureTicks += roundStats.ObjectiveCaptureTicks;
                    tempStats.ObjectiveDefenseTicks += roundStats.ObjectiveDefenseTicks;

                    teamUpdates.AddToCurrent(tempStats);

                    teamUpdates.SaveRoundToHistory(round);
                }
            }

            teamUpdates.RoundStats.ObjectiveCaptureTicks += playerTracker.RoundStats.ObjectiveCaptureTicks;
            teamUpdates.RoundStats.ObjectiveDefenseTicks += playerTracker.RoundStats.ObjectiveDefenseTicks;

            EventAggregateTracker.SubtractFromHistory(teamUpdates);
        }
Esempio n. 2
0
 public void SubtractStatsUpdate(ScrimEventAggregate update)
 {
     EventAggregateTracker.SubtractFromCurrent(update);
 }
Esempio n. 3
0
 public void AddStatsUpdate(ScrimEventAggregate update)
 {
     EventAggregateTracker.AddToCurrent(update);
 }