コード例 #1
0
 /// <summary>
 ///     Update the total played time for the given game in Player Preferences - using the level util class.
 /// </summary>
 /// <param name="gameName">Name of the game which score has to be updated.</param>
 /// <param name="playedTime">Played time for the given game.</param>
 public void UpdatePlayedTime(string gameName, float playedTime)
 {
     LevelUtil.UpdatePlayedTimeInPlayerPreferences(gameName, playedTime);
 }
コード例 #2
0
 /// <summary>
 ///    Set last completed level to the value returned by player preferences for the given game.
 /// </summary>
 public void SetLastCompletedLevel()
 {
     _lastCompletedLevel = LevelUtil.GetLastCompletedLevelFromPlayerPreferences(_gameName);
 }
コード例 #3
0
 /// <summary>
 ///     Update the total high score for the given game in Player Preferences - using the level util class.
 /// </summary>
 /// <param name="gameName">Name of the game which score has to be updated.</param>
 ///<param name="score">Score to be updated.</param>
 public void UpdateHighScore(string gameName, int score)
 {
     LevelUtil.UpdateLevelScoreInPlayerPreferences(gameName, GameLevel, score);
 }