Ok, I haven’t blogged about this really, because I’ve been coding đ
But I’m putting the finishing touches to my next game. Part of this push I’m adding Achievement support to the game using Scoreloop. This has been pretty easy to set up, as long as one remember to check for inital load before sending achievements to the score, but what I really wanted to get was a counter which Id’ like to show together with the achievement. For instance “Easy Five (2/5)” meaning 2 games have been completed but you need 5 games before you receive the achievement.
The actually “keeping score” of the achievement is supported within Scoreloop, using:
if(!a.isAchieved()) {
achievement.setValue(achievement.getValue() + 1);
}
if(achievement.needsSubmit()) ScoreloopManagerSingleton.get().achieveAward(achievement.getAward().getIdentifier(), true, true);
This would, however, NOT show up anywhere. But it is possible to get it, all you have to do is to go to the class AchievementListItem within ScoreloopUI, and there you can add it to any part of the text within the Achievement view. E.g. if you want it together with the title just change this function:
private static String getTitleText(final Achievement achievement) {
return achievement.getAward().getLocalizedTitle() + ” ” + “(” + achievement.getValue() + “/” + achievement.getAward().getAchievingValue() + “) “;
}