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);
        }
    }
示例#2
0
 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;
         }
     }
 }
示例#3
0
 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);
 }
示例#5
0
 private void OnChangeLanguage(App.Language language)
 {
     SwapStringToLanguage(language);
 }
示例#6
0
 private void OnChangeLanguage(App.Language language)
 {
     SwapImageToLanguage(language);
 }