Exemple #1
0
 private async void ChangeDifficulty(Settings.DifficultyLevel newDifficulty)
 {
     if (sliderDifficultyLevels.Value == 0)
     {
         await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => {
             showDifficultyLevel.Text = "Уровень сложности: Легкий";
         });
     }
     if (sliderDifficultyLevels.Value == 1)
     {
         await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => {
             showDifficultyLevel.Text = "Уровень сложности: Нормальный";
         });
     }
     if (sliderDifficultyLevels.Value == 2)
     {
         await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => {
             showDifficultyLevel.Text = "Уровень сложности: Максимальный";
         });
     }
 }
Exemple #2
0
 private void ChangeDifficulty(Settings.DifficultyLevel newDifficulty)
 {
     if (newDifficulty == Settings.DifficultyLevel.Easy)
     {
         Cat.healthCoefficient  = 2;
         Cat.hungerCoefficient  = 4;
         Cat.boredomCoefficient = 5;
         Cat.touletCoefficient  = 3;
     }
     if (newDifficulty == Settings.DifficultyLevel.Normal)
     {
         Cat.healthCoefficient  = 4;
         Cat.hungerCoefficient  = 6;
         Cat.boredomCoefficient = 7;
         Cat.touletCoefficient  = 5;
     }
     if (newDifficulty == Settings.DifficultyLevel.Hard)
     {
         Cat.healthCoefficient  = 5;
         Cat.hungerCoefficient  = 7;
         Cat.boredomCoefficient = 8;
         Cat.touletCoefficient  = 6;
     }
 }