Achievement Formatters

XNAchievement comes with three included achievement formatters;

DefaultAchievementFormatter

This Formatter returns the Name of the achievement, a new line and the current description (locked or unlocked). Code:
return achievement.Name + Environment.NewLine + achievement.Description;

NameOnlyFormatter

This Formatter returns only the Name of the Achievement. In Code:
return achievement.Name;

DebugFormatter

This Formatter is used by the DebugNotificationHandler and return the Name followed by the internal name in brackets. In Code;
return string.Format("{0} ({1})", achievement.Name, achievement.InternalName);

Last edited Jul 1, 2012 at 11:39 AM by simsmaster, version 1

Comments

No comments yet.