예제 #1
0
        //private bool fileDownloaded, fileExtracted = false;
        private void CheckQuranFiles()
        {
            Debug.Log("Checking Files...");

            if (PlayerPrefs.GetInt("QuranDownloaded") != 114)
            {
                Downloader.SetActive(true);
                DownloadText.text = "(ﺖﻳﺎﺑﺎﺠﻴﻣ 160 ﻢﺠﺣ) ﻊﻗﻮﻤﻟﺍ ﻦﻣ نﺁﺮﻘﻟﺍ تﺎﻔﻠﻣ ﻞﻳﺰﻨﺗ ﻰﻟﺇ ﻖﻴﺒﻄﺘﻟﺍ جﺎﺘﺤﻳ";
                DownloadButton.SetActive(true);
                DownloadButton.transform.GetChild(0).GetComponent <Text>().text = "ﻖﻓﺍﻮﻣ";
                DownloadButton.GetComponent <Image>().color = Green;

                return;
            }

            if (PlayerPrefs.GetInt("QuranExtracted") != 114)
            {
                StartCoroutine(ExtractQuranFiles());
                Debug.Log("extracting Quran files...");
                return;
            }

            //Quran Loaded
            Debug.Log("Quran finished loading");
            Downloader.SetActive(false);
            //yield return new WaitForSeconds(0.01f);

            //Set a var to Ready, to avoid checking files again
            //PlayerPrefs.SetInt("Quran_Ready", 114);
            BuildSuraButtons.InitilizeUI(this, NavParent);
            InitilizePrefs();
        }
예제 #2
0
 private void StartDownloading()
 {
     Downloader.SetActive(true);
     StartCoroutine(DownloadQuranFiles());
     isDownloading = true;
     DownloadButton.SetActive(true);
     DownloadButton.transform.GetChild(0).GetComponent <Text>().text = "ﻞﻳﺰﻨﺘﻟﺍ ءﺎﻐﻟﺍ";
     DownloadButton.GetComponent <Image>().color = Red;
     Debug.Log("Quran downloading...");
 }
예제 #3
0
 private void StopDownloading()
 {
     StopAllCoroutines();
     isDownloading = false;
     Downloader.SetActive(true);
     DownloadText.text = "(ﺖﻳﺎﺑﺎﺠﻴﻣ 160 ﻢﺠﺣ) ﻊﻗﻮﻤﻟﺍ ﻦﻣ نﺁﺮﻘﻟﺍ تﺎﻔﻠﻣ ﻞﻳﺰﻨﺗ ﻰﻟﺇ ﻖﻴﺒﻄﺘﻟﺍ جﺎﺘﺤﻳ";
     DownloadButton.SetActive(true);
     DownloadButton.transform.GetChild(0).GetComponent <Text>().text = "ﻖﻓﺍﻮﻣ";
     DownloadButton.GetComponent <Image>().color = Green;
     Debug.Log("Quran stopped downloading...");
 }