Пример #1
0
 public static void EatDesserts(string dessertName, int count)
 {
     if (count > 0)
     {
         int num  = GameProgress.DessertCount(dessertName);
         int num2 = num - count;
         if (num2 < 0)
         {
             num2 = 0;
             GameProgress.AddEatenDesserts(num);
         }
         else
         {
             GameProgress.AddEatenDesserts(count);
         }
         GameProgress.SetDessertCount(dessertName, num2);
     }
 }