Using OpenFeint to get current Achievement progression

心不动则不痛 提交于 2019-12-12 02:35:50

问题


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


回答1:


you can do this by calling :

[OFAchievementService getPercentComplete:achievementId forUser:[OpenFeint lastLoggedInUserId]];



回答2:


Make the following call:

double ofAchievementProgress = [[OFAchievement achievement:achievementId] percentComplete];


来源:https://stackoverflow.com/questions/4610481/using-openfeint-to-get-current-achievement-progression

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!