Skip to content

Instantly share code, notes, and snippets.

@Sumolari
Created April 18, 2016 16:19
Show Gist options
  • Save Sumolari/b549e4e8fd4635c776486954e94d1386 to your computer and use it in GitHub Desktop.
Save Sumolari/b549e4e8fd4635c776486954e94d1386 to your computer and use it in GitHub Desktop.
Getting achievement progress
#include "MawKit/GameKit.hpp"
void getSecretAchievementInfo()
{
MK::GameKit::requestAchievement(
MK::GameKit::AchievementIndex::SECRET_ACHIEVEMENT,
[]( float progress, bool success ) {
if ( success ) {
if ( progress == 1 ) {
// Achievement unlocked!
} else {
// Achievement not unlocked yet
}
} else {
// Error getting information
}
}
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment