If you want to update the currentScore
each time you register a score the following will work.
@implementation Score
static NSInteger currentScore;
static NSInteger bestScore;
+ (void)registerScore:(NSInteger)score
{
currentScore = score;
[Score setBestScore:score];
}
+ (void) setBestScore:(NSInteger)score
{
if (score > bestScore) {
bestScore = score;
}
}
+ (NSInteger) bestScore
{
return bestScore;
}
+ (NSInteger) currentScore{
return currentScore;
}
@end
EDIT: Updated answer with new request about not saving data.