Esempio n. 1
0
 // Methods
 /// <summary>
 /// Adds an <see cref="Rewtek.GameLibrary.Achivements.Achievement"/>.
 /// </summary>
 /// <param name="achievement">The <see cref="Rewtek.GameLibrary.Achivements.Achievement"/> to be added.</param>
 public void Add(Achievement achievement)
 {
     if (!Contains(achievement.Name))
     {
         _achievments.Add(achievement);
         Logger.Log("Achievement {0} has been registered", achievement.Name);
     }
     else
     {
         Logger.Log("Achievement {0} has already been registered", achievement.Name);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Removes an <see cref="Rewtek.GameLibrary.Achivements.Achievement"/>.
 /// </summary>
 /// <param name="achievement">The <see cref="Rewtek.GameLibrary.Achivements.Achievement"/> to be removed.</param>
 public void Remove(Achievement achievement)
 {
     _achievments.RemoveAll(match => match.Name == achievement.Name);
     Logger.Log("Achievement {0} has been unregistered", achievement.Name);
 }
Esempio n. 3
0
 /// <summary>
 /// Determines whether an <see cref="Rewtek.GameLibrary.Achivements.Achievement"/> is registered.
 /// </summary>
 /// <param name="achievement">The <see cref="Rewtek.GameLibrary.Achivements.Achievement"/> to locate.</param>
 public bool Contains(Achievement achievement)
 {
     return _achievments.Contains(achievement);
 }