Using OpenFeint to get current Achievement progres

2019-08-18 16:00发布

So I'm setting my achievement like so:

int currentPercentage = ... // Work out current percentage of progression to update too
[[OFAchievement achievement: ACHIEVEMENT_ID] updateProgressionComplete: currentPercentage andShowNotification: YES];

But is there anyway to get the currentProgression from the OF servers?

This would be useful to know so I can update the progression by a percentage rather than storing values locally to do this.

Thanks

2条回答
贼婆χ
2楼-- · 2019-08-18 16:32

you can do this by calling :

[OFAchievementService getPercentComplete:achievementId forUser:[OpenFeint lastLoggedInUserId]];
查看更多
何必那么认真
3楼-- · 2019-08-18 16:51

Make the following call:

double ofAchievementProgress = [[OFAchievement achievement:achievementId] percentComplete];
查看更多
登录 后发表回答