private ITextGenerator GetWordSandboxTextGenerator(GameSettings gameSettings) { currentDictionaryJson = gameSettings.GameLanguage == GameLanguage.En ? assetsReferences.wordsArrayJsonEn : assetsReferences.wordsArrayJsonRu; var wordsDictionary = JsonSerializationManager.ReadFromAsset <string[]>(currentDictionaryJson.text); return(new WordSandboxTextGenerator(wordsDictionary)); }
private ITextGenerator GetQWERTYTextGenerator(GameSettings gameSettings) { currentDictionaryJson = gameSettings.GameLanguage == GameLanguage.En ? assetsReferences.qwertyKeyboardJsonEn : assetsReferences.qwertyKeyboardJsonRu; var keyboard = JsonSerializationManager.ReadFromAsset <KeyboardQWERTY>(currentDictionaryJson.text); if (keyboard == null) { Debug.LogError("Cannot find dictionary for qwerty text generation!"); return(null); } var options = new QWERTYOptions(gameSettings.HandType, gameSettings.SectionTypes); return(new QWERTYTextGenerator(keyboard, options, gameSettings.MinWordLength, gameSettings.MaxWordLength)); }