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()