void Start() { game.AudioManager(audioClip); BaseQuestions baseQuestions = new BaseQuestions(); List <Questions> questions = baseQuestions.BaseActive(); int countQuestions = questions.Count; if (countQuestions % 100 >= 10 && countQuestions % 100 <= 19 || countQuestions % 10 == 0 || countQuestions % 10 >= 5 && countQuestions % 10 <= 9) { startNewPlayer2Text.text = $"База содержит в себе {countQuestions} вопросов."; } else if (countQuestions % 10 >= 2 && countQuestions % 10 <= 4) { startNewPlayer2Text.text = $"База содержит в себе {countQuestions} вопроса."; } else { startNewPlayer2Text.text = $"База содержит в себе {countQuestions} вопрос."; } }
private void Start() { Game.id = -1; BaseQuestions baseQuestions = new BaseQuestions(); questions = baseQuestions.BaseActive(); if (Game.startWhith == "Arcade") { imageBackground.color = new Color(0.102f, 0.110f, 0.157f, 1.000f); game.gameMode = "Arcade"; } else if (Game.startWhith == "Classic") { imageBackground.color = new Color(0.102f, 0.110f, 0.157f, 1.000f); game.gameMode = "Classic"; } game.numberOfQuestions = questions.Count; game.nonRepetitionSystemArray = xmlNRepetition.LoadNonRepetitionSystem(); BaseQuestionsWorkThread(); game.deviceId = SystemInfo.deviceUniqueIdentifier; game.settingString = game.xmlData.LoadSetting(); game.xmlData.LoadStats(); if (game.settingString.Count != 0) { if (game.settingString.Count >= 1) { toggleSound.SetSound(Boolean.Parse(game.settingString[0])); } if (game.settingString.Count >= 2) { toggleMusic.SetMusic(Boolean.Parse(game.settingString[1])); } if (game.settingString.Count >= 3) { game.touch = Boolean.Parse(game.settingString[2]); } if (game.settingString.Count >= 4) { game.newPlayer = Boolean.Parse(game.settingString[3]); } if (game.settingString.Count >= 5) { game.versionGame = game.settingString[4]; } else { game.versionGame = "ERROR"; } if (game.settingString.Count >= 6) { game.classicPassed = Boolean.Parse(game.settingString[5]); } if (game.settingString.Count >= 7) { game.promptInModeMenu = Boolean.Parse(game.settingString[6]); } if (game.settingString.Count >= 8) { toggleVideoInMainMenu.SetVideoSetting(Boolean.Parse(game.settingString[7])); game.videoInGameMenu = Boolean.Parse(game.settingString[7]); } if (game.settingString.Count >= 9) { game.languageMenu = game.settingString[8]; } if (game.settingString.Count >= 10) { game.languageSounds = game.settingString[9]; } } if (game.languageSounds == "") { game.languageSounds = "RU"; } arcadeMeneger.SetActive(true); if (game.videoInGameMenu == false) { videoMainMenu.gameObject.SetActive(false); } if (game.classicPassed == false) { modeMenu.arcadeText = "Чтобы открыть аркаду, нужно пройти рейтинговый тест."; buttonArcade.GetComponent <AudioSource>().clip = modeMenu.GetComponent <ButtonStartTest>().mipMap; buttonArcade.GetComponent <Image>().material = materialGrayscale; imageBestPlayerInArcade.color = new Color(1, 1, 1); var main = miniCircleInArcade.main; main.startColor = new Color(1, 1, 1); } else { buttonArcade.onClick.AddListener(delegate { SwitchButtonHandler("Arcade"); }); } if (game.playerName != "") { textProfileName1.text = game.playerName; textProfileName2.text = game.playerName; } baseConnect.GetStatsThread(); GetLeaderBoardClassicThread(); GetLeaderBoardArcadeThread(); }