Ejemplo n.º 1
0
    /// <summary>
    /// 微课初始化
    /// </summary>
    public void init()
    {
        PPTGlobal.pptStatus = PPTGlobal.PPTStatus.unziping;
        ModelUiCamera.depth = 21;
        LittleMapCam.depth  = 20;
        Camera.main.depth   = 20;
        ModelBgCamera.depth = 19;
        initProgress("正在解析资源");
        //yield return null;
        if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.pc || PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.ios || PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.android)
        {
            Debug.Log("init WeiKe");
            //string basePath = AppOpera.WeiKePlayer_path;
            //if (basePath!=string.Empty) {
            //    Vesal_DirFiles.DelectDir(basePath);
            //}
            //Vesal_DirFiles.CreateDir(basePath + PublicClass.app.app_id + "/");
            //StartCoroutine(Vesal_DirFiles.UnZipAsync(basePath + PublicClass.app.ab_path, basePath + PublicClass.app.app_id + "/", unzipProgress, true));

            unzipProgress(1.0F);
        }
        PPTGlobal.PPTPath = PPTGlobal.PPTPath + message + "/";
        Debug.Log(PPTGlobal.PPTPath);
        if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.PPTPlayer || PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.WeiKePlayer)
        {
            if (isSkipUnzip)
            {
                isSkipUnzip = false;
                unzipProgress(1f);
            }
            else
            {
                if (PPTHomePageController.TempFilePath != string.Empty)
                {
                    Vesal_DirFiles.DelectDir(PPTHomePageController.TempFilePath);
                }
                Debug.Log(PPTHomePageController.tmpSelectPath);
                //PPTHomePageController.TempFilePath = Vesal_DirFiles.get_dir_from_full_path(PPTHomePageController.tmpSelectPath)+ System.Guid.NewGuid().ToString("N");

                Debug.Log(PPTHomePageController.TempFilePath);
                StartCoroutine(Vesal_DirFiles.UnZipAsync(PPTHomePageController.tmpSelectPath, PPTHomePageController.TempFilePath, unzipProgress, true));
            }
        }
    }