private void ActiveWithLanguage(App.Language language) { if (language == App.Language.AUTO) { return; } GameObject[] activeList = null; GameObject[] deactiveList = null; if (language == App.Language.EN) { activeList = enList; deactiveList = cnList; } else if (language == App.Language.CN) { activeList = cnList; deactiveList = enList; } int i = activeList.Length; while (--i >= 0) { activeList[i].SetActive(true); } i = deactiveList.Length; while (--i >= 0) { deactiveList[i].SetActive(false); } }
private void SwapStringToLanguage(App.Language language) { if (language == App.Language.EN) { if (text != null) { text.text = stringEN; } } else if (language == App.Language.CN) { if (text != null) { text.text = stringCN; } } }
private void SwapImageToLanguage(App.Language language) { if (language == App.Language.EN) { if (spriteEN != null) { m_image.sprite = spriteEN; } } else if (language == App.Language.CN) { if (spriteCN != null) { m_image.sprite = spriteCN; } } }
private void OnChangeLanguage(App.Language language) { ActiveWithLanguage(language); }
private void OnChangeLanguage(App.Language language) { SwapStringToLanguage(language); }
private void OnChangeLanguage(App.Language language) { SwapImageToLanguage(language); }