Example #1
0
 private void OnKillsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
 {
     TeamKillCount   = Kills.Count(k => k.KilledSide == k.KillerSide);
     KillCount       = Kills.Count(k => k.KilledSide != k.KillerSide) - TeamKillCount - SuicideCount;
     HeadshotCount   = Kills.Count(k => k.KilledSide != k.KillerSide && k.IsHeadshot);
     CrouchKillCount = Kills.Count(k => k.KilledSide != k.KillerSide && k.IsKillerCrouching);
     JumpKillCount   = Kills.Count(k => k.KilledSide != k.KillerSide && k.KillerVelocityZ > 0);
 }
Example #2
0
 private void OnKillsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
 {
     KillCount       = Kills.Count;
     DeathCount      = Kills.Count;
     TradeKillCount  = Kills.Count(k => k.IsTradeKill);
     HeadshotCount   = Kills.Count(k => k.IsHeadshot);
     EntryKillCount  = Players.Sum(p => p.EntryKills.Count);
     CrouchKillCount = Players.Sum(p => p.CrouchKillCount);
     AssistCount     = Kills.Count(k => k.AssisterSteamId != 0);
     JumpKillCount   = Kills.Count(killEvent => killEvent.KillerVelocityZ > 0);
     KnifeKillCount  = Kills.Count(killEvent => killEvent.Weapon.Element == EquipmentElement.Knife);
     TeamKillCount   = Players.Sum(p => p.TeamKillCount);
 }
Example #3
0
        private void OnKillsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
        {
            KillCount       = Kills.Count;
            JumpKillCount   = Kills.Count(killEvent => killEvent.KillerVelocityZ > 0);
            CrouchKillCount = Kills.Count(killEvent => killEvent.IsKillerCrouching);
            TradeKillCount  = Kills.Count(k => k.IsTradeKill);

            var kills = Kills.Where(k => k.KillerSide != k.KilledSide && k.KillerSteamId != 0)
                        .GroupBy(k => k.KillerSteamId)
                        .Select(group => new
            {
                SteamId   = group.Key,
                KillCount = group.Count()
            }).ToList();

            OneKillCount   = kills.Count(k => k.KillCount == 1);
            TwoKillCount   = kills.Count(k => k.KillCount == 2);
            ThreeKillCount = kills.Count(k => k.KillCount == 3);
            FourKillCount  = kills.Count(k => k.KillCount == 4);
            FiveKillCount  = kills.Count(k => k.KillCount == 5);
        }