示例#1
0
    public int Get(int level)
    {
        int score = 0;

        _scores.TryGetValue(level, out score);
        return(score);
    }
示例#2
0
        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++;
            }
        }