Метод повышения сложности аппарата перенесен в DifficultyManager
This commit is contained in:
parent
8432a3ab4c
commit
631e9f873a
@ -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<SettingsScreen>().RefreshViews();
|
||||
print("Сложность повышена");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
IEnumerator AddBotRecordEvery2Days()
|
||||
|
||||
@ -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<SettingsScreen>().RefreshViews();
|
||||
print("Сложность повышена");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user