public void StoreToken(LeaderboardToken token) { if (token.isInvalid) { return; } print("New Record, level " + token.levelIndex + " completed in: " + token.timeInSecs.ToString()); PlayerPrefs.SetFloat(token.key, token.timeInSecs); }
public LeaderboardToken GetToken(int levelIndex) { float current = GetRecordedTime(levelIndex); if (current == noScoreRecorded) { return(LeaderboardToken.Invalid(levelIndex)); } return(LeaderboardToken.WithData(levelIndex, current)); }