我希望我的应用程序检查成就是否完成,我写了下一个:
-(void)checkAchievements{
NSString* identifier = NULL;
double percentComplete = 0;
if (self.SavedScore >= 100) {
identifier = kAchivement100Taps;
percentComplete = 100.0;
}
if (self.SavedScore >= 500) {
identifier = kAchivement500Taps;
percentComplete = 100.0;
}
[...more similar achievements...]
if(identifier!= NULL){
[self.gameCenterManager submitAchievement: identifier percentComplete: percentComplete];
}
}
这种方法正确吗?谢谢!