void Start() { inst = this; loadingText.gameObject.SetActive(true); content.gameObject.SetActive(false); string url = "http://madebyjimchen.com/WarOfCastles/api/getLanguageList.php"; JimHtml.DownLoadJson <LanguageSource>(Data.inst, url, false, processList); }
public void SetLanguageName(string languageName, Action <bool> after) { if (languageName != GetLanguageName()) { PlayerPrefs.SetString("language", languageName); string url = "http://madebyjimchen.com/WarOfCastles/api/getLanguageSource.php?language=" + languageName; JimHtml.DownLoadJson <LanguageSource>(Data.inst, url, false, (LanguageSource lang, bool isError) => { if (!isError) { this.languageSource = lang; SaveLanguageSource(); } after(isError); }); } else { after(true); } }