public void Init()
    {
        if (langHolder.childCount == 0)
        {
            CreateLangButtons();
        }
        if (PlayerPrefsManager.GetLang() == string.Empty)
        {
            if (SystemLanguageInList(Application.systemLanguage.ToString()))
            {
                PlayerPrefsManager.SetLang(Application.systemLanguage.ToString());
            }
            else
            {
                PlayerPrefsManager.SetLang(SystemLanguage.English.ToString());
            }
        }
        LanguageScript.ParseStrings();
        if (PlayerPrefsManager.GetLang() == "Hebrew")
        {
            UnityEngine.Object.Destroy(title.GetComponent <ArabicText>());
            UnityEngine.Object.Destroy(button.GetComponent <ArabicText>());
        }
        title.text  = LanguageScript.SelectLanguageText;
        button.text = LanguageScript.PlayTextFixed;
        IEnumerator enumerator = buttonHolder.GetEnumerator();

        try
        {
            while (enumerator.MoveNext())
            {
                Transform transform = (Transform)enumerator.Current;
                transform.Find("Frame").gameObject.SetActive(value: false);
                transform.Find("Text").GetComponent <Text>().color = Color.white;
                if (transform.name.ToLower() == PlayerPrefsManager.GetLang().ToLower())
                {
                    transform.Find("Frame").gameObject.SetActive(value: true);
                    transform.Find("Text").GetComponent <Text>().color   = FugoUtils.HexToColor("09FF15");
                    transform.Find("Frame").GetComponent <Image>().color = FugoUtils.HexToColor("09FF15");
                }
            }
        }
        finally
        {
            IDisposable disposable;
            if ((disposable = (enumerator as IDisposable)) != null)
            {
                disposable.Dispose();
            }
        }
    }
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
         LanguageScript.ParseStrings();
         if (Application.isPlaying)
         {
             UnityEngine.Object.DontDestroyOnLoad(base.gameObject);
         }
     }
     else
     {
         UnityEngine.Object.Destroy(base.gameObject);
     }
 }
 private void Awake()
 {
     try
     {
         instance        = this;
         errorText2.text = "Error: 100";
         SetIfArabic();
         errorText2.text = "Error: 101";
         LanguageSelectScript.ParseLangData();
         errorText2.text = "Error: 102";
         if (PlayerPrefsManager.GetHiddenMenu())
         {
             hiddenMenuButton.SetActive(value: true);
         }
         else
         {
             hiddenMenuButton.SetActive(value: false);
         }
         errorText2.text = "Error: 103";
         errorText2.text = "Error: 104";
         errorText2.text = "Error: 105";
         if (GoogleAnalyticsScript.instance == null)
         {
             if (PlayerPrefsManager.GetGARandom() == -1)
             {
                 PlayerPrefsManager.SetGARandom(UnityEngine.Random.Range(0, 10000));
             }
             UnityEngine.Object.Instantiate(googleAnalyticsPrefab).name = "GoogleAnalytics";
         }
         errorText2.text = "Error: 106";
         if (RequestManager.instance == null)
         {
             UnityEngine.Object.Instantiate(reqManager).name = "RequestManager";
             RequestManager.instance.GetLogRequest();
         }
         errorText2.text = "Error: 107";
         errorText2.text = "Error: 108";
         errorText2.text = "Error: 109";
         if (PlayerPrefsManager.GetLang() == string.Empty)
         {
             OpenLanguagePopup(flag: false);
             shouldSetTexts = false;
         }
         else
         {
             LanguageScript.ParseStrings();
             errorText2.text = "Error: 110";
             if (Games.sections == null)
             {
                 Games.ParseGameData(string.Empty);
             }
             errorText2.text = "Error: 111";
             errorText2.text = "Error: 112";
             startButton.transform.localScale  = Vector3.zero;
             questButton.transform.localScale  = Vector3.zero;
             levelsButton.transform.localScale = Vector3.zero;
             dailyButton.transform.localScale  = Vector3.zero;
             errorText2.text = "Error: 113";
             SettingsCloseButtonClicked(0.001f);
             errorText2.text = "Error: 114";
             CloseDailyGiftPopup(0.001f);
             errorText2.text = "Error: 115";
             ShopCloseButtonClicked(0.001f);
             errorText2.text = "Error: 116";
             CloseRewardedPopup(0.001f);
             errorText2.text = "Error: 117";
             CloseHiddenMenu(0.001f);
             errorText2.text = "Error: 118";
             CloseSetTutorialPopup(0.001f);
             CloseQuestPopup(0.001f);
             CloseHiddenLevelPopup(0.001f);
             CloseWheelPopup(0.001f);
             errorText2.text             = "Error: 119";
             QualitySettings.vSyncCount  = 0;
             Application.targetFrameRate = 60;
             errorText2.text             = "Error: 120";
             if (fromGameToSections)
             {
                 sectionPanel.SetActive(value: true);
             }
             errorText2.text = "Error: 121";
             SetVersionText();
             Input.multiTouchEnabled = false;
             errorText2.text         = "Error: 122";
             Screen.sleepTimeout     = -1;
             errorText2.text         = "Error: 123";
             if (SectionController.setCompleted || SectionController.hiddenSetCompleted != -1)
             {
                 sectionPanel.SetActive(value: true);
             }
             errorText2.text = "Error: 124";
             errorText2.text = "Error: 125";
             if (PlayerPrefsManager.IsFirstRun() == 0)
             {
                 PlayerPrefsManager.SetFirstRun();
                 GameController.levelToOpen = -1;
                 StartCoroutine(GoToGameScreenDelayed());
             }
             errorText2.text = "Error: 126";
             if (FugoAdManager.instance == null)
             {
                 UnityEngine.Object.Instantiate(admanagerPrefab).name = "AdManager";
                 errorText.text = "Error: 127";
                 FugoAdManager.instance.coinHolder = animBG;
                 errorText.text = "Error: 128";
                 NotificationSystem.CreateDailyNotification();
                 errorText.text = "Error: 129";
             }
         }
     }
     catch (Exception exception)
     {
         errorText2.gameObject.SetActive(value: true);
         UnityEngine.Debug.LogException(exception);
     }
 }