示例#1
0
    public static bool LoadTraduction(SystemLanguage language)
    {
        if (_texts.ContainsKey(language))
        {
            return(true);
        }
        _language = language;
        GameTexts newText = new GameTexts();

        newText.Texts = StreamingAssetAccessor.FromJson <TradWrapper>("Json/" + language + ".json");
        if (newText.Texts != null)
        {
            newText.Generate();
            _texts.Add(language, newText);
            return(true);
        }
        else
        {
            return(false);
        }
    }