Exemplo n.º 1
0
 public AchievementLevel NextLevel(AchievementLevel current)
 {
     if (current.Level == GetMaxLevel())
     {
         return(current);
     }
     return(Levels.Single(x => x.Level == current.Level + 1));
 }
Exemplo n.º 2
0
        protected Achievement(int value, string name, int [] requirements, ValuePrefix prefix, bool display = true) : base(((int)prefix) * 100 + value, name)
        {
            Display = display;
            Levels  = new AchievementLevel [requirements.Length];

            for (int i = 0; i < requirements.Length; ++i)
            {
                Levels [i] = new AchievementLevel(i + 1, requirements [i]);
            }
        }