public int Get(int level) { int score = 0; _scores.TryGetValue(level, out score); return(score); }
private void UpdateScores(Mobile died, Mobile killer) { if (ScoreTable == null) { return; } ScoreKeeper scoreKeeper; if (died != null && ScoreTable.TryGetValue(died.Serial, out scoreKeeper)) { scoreKeeper.Deaths++; } if (killer != null && killer is PlayerMobile && ScoreTable.TryGetValue(killer.Serial, out scoreKeeper)) { scoreKeeper.Kills++; } }