From 631e9f873ab2193c2e7c393acd97e61ae5aba825 Mon Sep 17 00:00:00 2001 From: se_ga Date: Fri, 20 Mar 2026 13:41:10 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B5=D1=82=D0=BE=D0=B4=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=B2=D1=8B=D1=88=D0=B5=D0=BD=D0=B8=D1=8F=20=D1=81=D0=BB=D0=BE?= =?UTF-8?q?=D0=B6=D0=BD=D0=BE=D1=81=D1=82=D0=B8=20=D0=B0=D0=BF=D0=BF=D0=B0?= =?UTF-8?q?=D1=80=D0=B0=D1=82=D0=B0=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BD=D0=B5?= =?UTF-8?q?=D1=81=D0=B5=D0=BD=20=D0=B2=20DifficultyManager?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Core/GameManager.cs | 15 +-------------- Assets/Scripts/DifficultyManager.cs | 15 +++++++++++++++ Assets/Scripts/Gameplay/EndOfTurnHandler.cs | 2 +- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/Assets/Scripts/Core/GameManager.cs b/Assets/Scripts/Core/GameManager.cs index 8bf56a6..bbfa17e 100644 --- a/Assets/Scripts/Core/GameManager.cs +++ b/Assets/Scripts/Core/GameManager.cs @@ -412,20 +412,7 @@ public class GameManager : MonoBehaviour } } } - public void upgradeFeeshkaDifficulty() - { - string difficultyType = SettingsManager.GetString("BaseBotDifficulty", "Обычная"); - if (difficultyType == "Обычная") - { - PlayerPrefs.SetInt("PulsesCounter", 0); - Setting difficultySetting = SettingsManager.Container.TryGetSetting("BaseBotDifficulty"); - difficultySetting.StringValue = "Повышенная"; - SettingsManager.OnSettingsChanged?.Invoke(); - SettingsManager.SaveContainerToFile(); - AdminPanel.GetComponent().RefreshViews(); - print("Сложность повышена"); - } - } + IEnumerator AddBotRecordEvery2Days() diff --git a/Assets/Scripts/DifficultyManager.cs b/Assets/Scripts/DifficultyManager.cs index eea2486..8f5d12a 100644 --- a/Assets/Scripts/DifficultyManager.cs +++ b/Assets/Scripts/DifficultyManager.cs @@ -54,4 +54,19 @@ public class DifficultyManager : MonoBehaviour currentOpponent = 0; CharacterController.ResetCharactersDifficulty(); } + + public void upgradeFeeshkaDifficulty() + { + string difficultyType = SettingsManager.GetString("BaseBotDifficulty", "Обычная"); + if (difficultyType == "Обычная") + { + PlayerPrefs.SetInt("PulsesCounter", 0); + Setting difficultySetting = SettingsManager.Container.TryGetSetting("BaseBotDifficulty"); + difficultySetting.StringValue = "Повышенная"; + SettingsManager.OnSettingsChanged?.Invoke(); + SettingsManager.SaveContainerToFile(); + GameManager.instance.AdminPanel.GetComponent().RefreshViews(); + print("Сложность повышена"); + } + } } diff --git a/Assets/Scripts/Gameplay/EndOfTurnHandler.cs b/Assets/Scripts/Gameplay/EndOfTurnHandler.cs index 9384a08..03e9a4c 100644 --- a/Assets/Scripts/Gameplay/EndOfTurnHandler.cs +++ b/Assets/Scripts/Gameplay/EndOfTurnHandler.cs @@ -70,7 +70,7 @@ public static class EndOfTurnHandler gm.botScale.SetMedalsCount(gm.vsBotScore); //если фишку победили, то повышаем. - if (gm.vsBotScore == gm.botsAmount) gm.upgradeFeeshkaDifficulty(); + if (gm.vsBotScore == gm.botsAmount) DifficultyManager.Instance.upgradeFeeshkaDifficulty(); } private static void PvpEndroundHandler()