Created
April 18, 2016 16:19
-
-
Save Sumolari/b549e4e8fd4635c776486954e94d1386 to your computer and use it in GitHub Desktop.
Getting achievement progress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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