Beispiel #1
0
 public void SaveStars(int stars)
 {
     if (stars > data.stars)
     {
         data.totalStars += stars - data.stars;
     }
     data.stars = stars;
     data.exp  += waitingExp;
     if (data.exp > maxExp)
     {
         data.exp = maxExp;
     }
     if (waitingNewChallenges != null)
     {
         data.challenges = waitingNewChallenges;
     }
     SaveAndLoad.SaveData(data);
     waitingNewChallenges = null;
     waitingExp           = 0;
     challengeCont.ChallengesSaved();
 }