Ejemplo n.º 1
0
    IEnumerator loadLevel()
    {
        do
        {
            yield return(new WaitForSeconds(0.5f));

            mainPath = DownloadOBBController.GetMainOBBPath(expPath);
        }while(mainPath == null);


        NGUIDebug.Log(" load  level   find path 	  "+ mainPath);
        lblDesp.gameObject.SetActive(true);
        slider.gameObject.SetActive(true);
        slider.value = 0;
        BtnDownLoad.gameObject.SetActive(false);

        if (downloadStarted == false)
        {
            downloadStarted = true;
            uri             = "file://" + mainPath;
            www             = WWW.LoadFromCacheOrDownload(uri, 0);
            NGUIDebug.Log(" load  level in  { }   " + www.error);
            yield return(www);

            if (www.error == null)
            {
                Application.LoadLevel(0);
                Core.Data.usrManager.isDownOBB = 1;
            }
        }
    }
Ejemplo n.º 2
0
    public void FindOBBFilePath()
    {
        string mainPath  = DownloadOBBController.GetMainOBBPath(expPath);
        string patchPath = DownloadOBBController.GetPatchOBBPath(expPath);

        NGUIDebug.Log("Main = ..." + (mainPath == null ? " NOT AVAILABLE" : mainPath.Substring(expPath.Length)));
        NGUIDebug.Log("Patch = ..." + (patchPath == null ? " NOT AVAILABLE" : patchPath.Substring(expPath.Length)));

        if (mainPath == null || patchPath == null)
        {
            DownloadOBBController.FetchOBB();
        }
    }